只需要將主函數改爲類似於下面的形式即可
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(); } |