只需要将主函数改为类似于下面的形式即可
int
main(
int
argc,
char
*argv[])
{
QApplication a(argc, argv);
QPixmap pixmap(
":/splash.jpg"
);
QSplashScreen splash(pixmap);
splash.show();
a.processEvents();
MainWindow w;
w.show();
splash.finish(&w);
return
a.exec();
}
|