PDA

View Full Version : QMovie animation



Sahab
13th March 2010, 12:19
QWidget *w = new QWidget(this);
setCentralWidget(w);

QVBoxLayout *vLayout = new QVBoxLayout;
w->setLayout(l);

for(int i = 0; i < 7; ++i) {
QLabel *lbl = new QLabel(w);
QMovie *movie = new QMovie(lbl);
movie->setFileName("aq.gif");
lbl->setMovie(movie);
vLayout->addWidget(lbl);

movie->start();
}

w->show();

animation doesn't work if no events(e.g. mousemove/mousepress)
if i create one QLabel - it's ok
in QGridLayout/QHBoxLayout - the same bug.



p.s. XP/Win7: MinGW/MSVC