Qt C++ make a Label show animated GIF - for something like an ajax-loading icon

less than 1 minute read

Published:

Just use a QMovie together with your label… something like this:

in class ctor

iAnimGif = new QMovie(":/images/ajax-loader.gif");

show the animation when needed

ui->connectLoadingLabel->setMovie(iAnimGif);
iAnimGif->start();

Leave a Comment