[QT QT] FIG movable tab to load a gif

FIG QT movable loading gif

table of Contents

1. Add the header file

2. Add the code .cpp

3. Effect


1. Add the header file

#include <QMovie>
#include <QCoreApplication>

2. Add the code .cpp

QMovie *gif1 = new QMovie(QCoreApplication::applicationDirPath()+"/load.gif");
ui->label_gif->setMovie(gif1);
gif1->start();

3. Effect

Published 139 original articles · won praise 24 · views 60000 +

Guess you like

Origin blog.csdn.net/rong11417/article/details/103992319