#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实现程序启动画面
最新推荐文章于 2025-10-13 22:40:11 发布
479

被折叠的 条评论
为什么被折叠?



