KelvinS
KelvinS

Reputation: 3061

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?

Upvotes: 4

Views: 2385

Answers (1)

baci
baci

Reputation: 2588

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();

Upvotes: 6

Related Questions