Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a splash screen on Qt?

I want to create a simple splash screen for my Qt application. I'm learning how to create Qt application and have little knowledge. Any help would be gladly appreciated!

like image 698
user7062312 Avatar asked Mar 10 '23 07:03

user7062312


1 Answers

I recently created this splash screen, I think you can use it. Make sure to add this in 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()));
like image 145
makkhay gurung Avatar answered Mar 23 '23 08:03

makkhay gurung