PDA

View Full Version : GIF support



talk2amulya
10th February 2009, 09:28
hi,

I am trying to run a gif file in my application. I have copied the gif dll from Plugins directory in the folder of my exe. Besides, i have also added QTPLUGINS entry in the pro file. But the animation in the file doesnt show. What else has to be done to be able to run the gif file.

Amulya

spirit
10th February 2009, 09:43
do you use QMovie to render gif animation?

talk2amulya
10th February 2009, 09:50
hi,

no, i m just using a simple image and giving it the path of the gif file and then showing it as a pixmap of label. I guess this is the wrong way. Could u please give me an example how to show an animating gif file in a QT Application?

Thanks a heap!

talk2amulya
10th February 2009, 09:57
Hi spirit,

thanks for the advice of using QMovie. It works smoothly now!

Thanks!

spirit
10th February 2009, 09:57
from Qt Assistant


QLabel label;
QMovie *movie = new QMovie("animations/fire.gif");

label.setMovie(movie);
movie->start();