2016-12-27 95 views

回答

3

我最近創建了這個啓動畫面,我想你可以使用它。請確保在main.cpp中添加此項

QSplashScreen *splash = new QSplashScreen; 
splash->setPixmap(QPixmap("/PATH/splash.jpg")); // splash picture 
splash->show(); 

MainWindow w; 

QTimer::singleShot(2500, splash,SLOT(close())); // Timer 
QTimer::singleShot(2500,&w,SLOT(show())); 
+0

謝謝,它工作正常。 – user7062312

+0

@ user7062312如果它適合您,請您接受答案嗎? – demonplus