只需要将主函数改为类似于下面的形式即可
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();
}
|
转自:http://www.cnblogs.com/rollenholt/archive/2012/04/10/2441292.html