📄 splash.cpp
字号:
#include <qtimer.h>#include <qlabel.h>#include <qlcdnumber.h>#include <qpushbutton.h>#include <qlayout.h>#include <qvariant.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qcombobox.h>#include <qtable.h>#include <qapplication.h>#include <qwidget.h>#include <qpainter.h>#include <qpixmap.h>#include "splash.h" SplashWindow::SplashWindow( QWidget* parent , const char* name , WFlags fl ) :QWidget( parent, name, fl ){ timer_new = new QTimer(this); this->resize(640,480); connect( timer_new, SIGNAL(timeout()), this,SLOT(my_time_out()) ); timer_new->start( 500 );}SplashWindow::~SplashWindow(){}void SplashWindow::paintEvent(QPaintEvent*){ QPixmap image("./ujs.bmp"); QPainter paint; paint.begin(this); paint.drawPixmap(0,0,image); paint.end(); }void SplashWindow::my_time_out(){ timer_new->stop(); qDebug("I am running"); mypower=new Power( NULL, "powlog",Qt::WDestructiveClose | Qt::WStyle_Customize | Qt::WStyle_NoBorder);// mypower->exec(); qApp->quit(); qApp->setMainWidget(mypower); mypower->show(); qApp->exec();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -