I have been trying to insert an animated picture GIF in a QLabel. I searched in Google to see how to do it (I am a newbie )
I used this code:
#include <QtGui>
int main(int argc, char* argv[])
{
// On crée une vidéo. Ici, c'est un GIF
QMovie movie
("c:/Mickey-11.gif");
// On l'associe à un label
w.setMovie (&movie);
// On lance la vidéo
movie.start ();
w.show();
return app.exec();
}
#include <QtGui>
int main(int argc, char* argv[])
{
QApplication app(argc, argv);
QLabel w;
// On crée une vidéo. Ici, c'est un GIF
QMovie movie("c:/Mickey-11.gif");
// On l'associe à un label
w.setMovie (&movie);
// On lance la vidéo
movie.start ();
w.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
(from http://qt.developpez.com/faq/?page=animation#gif_anime)
but it is not working. They mentioned compiling the GIF plugin but I didn't know how to do it.
Thanx for your help
Bookmarks