Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to customize the loading screen in Qt?

I need to create a customized and animated loading screen in Qt, and I don't need a progress bar.

I want to do something like this:

enter image description here

Anyone knows how can I do that?

Can I use, for example, QSplashScreen?

like image 461
KelvinS Avatar asked Oct 12 '25 14:10

KelvinS


1 Answers

Try QMovie to load an animation`

QMovie * movie = new QMovie("https://i.sstatic.net/vdYAH.gif");

You can either load the movie directly to a label, hide and show it when necessary

QLabel label;
label.setMovie(movie);
movie->start();

Or read the frames of the movie to set splash screen pixmap continuously

connect(movie, SIGNAL(frameChanged(int)), this, SLOT(setSplashScreenPixmap(int)));
movie->start();
like image 116
baci Avatar answered Oct 14 '25 04:10

baci



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!