#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(); }
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交