3

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?

peterh
  • 11,875
  • 18
  • 85
  • 108
KelvinS
  • 2,870
  • 8
  • 34
  • 67

1 Answers1

6

Try QMovie to load an animation`

QMovie * movie = new QMovie("https://i.stack.imgur.com/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();
baci
  • 2,528
  • 15
  • 28