QSplashScreen 制作初始化界面

QPixmap pixmap("2340_1428373194.bmp");
 QSplashScreen *pSplash = new QSplashScreen(pixmap);
 pSplash->show();
 pSplash->showMessage("正在初始化",Qt::AlignCenter);
 a.processEvents();
 Sleep(3000);
 pSplash->showMessage("正在打开设备");
 a.processEvents();
 Sleep(3000);
 pSplash->showMessage("初始化完成");
 Sleep(3000);
 a.processEvents();
 splash w;
 w.show();
 pSplash->finish(&w);
 return a.exec();

你可能感兴趣的:(QT)