#include "widget.h" #include <QApplication> #include<QSplashScreen> #include<QDateTime> #include<QPixmap> #include<QString> #include<QDateTime> int main(int argc, char *argv[]) { QApplication a(argc, argv); QPixmap pix(":/start.png"); QSplashScreen *pSS = new QSplashScreen(pix); pSS->show(); pSS->showMessage(QString("程序初始化中......"),Qt::AlignRight|Qt::AlignBottom,Qt::white); a.processEvents(); QDateTime dt = QDateTime::currentDateTime(); QDateTime now; do { now = QDateTime::currentDateTime(); } while (dt.secsTo(now)<= 5); Widget w; w.show(); pSS->finish(&w); delete pSS; pSS = NULL; return a.exec(); }
Qt实现程序启动画面
最新推荐文章于 2024-08-29 13:31:21 发布