What about using void QTabBar::setTabButton(int index, ButtonPosition position, QWidget * widget)? You can add QLabel and set a movie on it.
QLabel *animationLabel
= static_cast<QLabel
*>
(tabBar
->tabButton
(index,
QTabBar::LeftSide));
if (!animationLabel) {
animationLabel
= new QLabel(this);
}
if (!loadingAnimation->movie()) {
animationLabel->setMovie(movie);
movie->start();
}
tabBar
->setTabButton
(index,
QTabBar::LeftSide, animationLabel
);
QLabel *animationLabel = static_cast<QLabel*>(tabBar->tabButton(index, QTabBar::LeftSide));
if (!animationLabel) {
animationLabel = new QLabel(this);
}
if (!loadingAnimation->movie()) {
QMovie *movie = new QMovie(":images/animation.gif", QByteArray(), animationLabel);
animationLabel->setMovie(movie);
movie->start();
}
tabBar->setTabButton(index, QTabBar::LeftSide, animationLabel);
To copy to clipboard, switch view to plain text mode
Bookmarks