QPushButton btn = new QPushButton();
QVBoxLayout* layout = new QVBoxLayout(btn);
QLabel* label = new QLabel();
label->setAlignment(Qt::AlignHCenter);
QMovie* movie = new QMovie("test.gif");
movie->setScaleSize(QSize(20,20));
label->setMovie(movie);
layout->addWidget(label);
movie->start();
movie->stop();