Animated gifs in QMovie

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2009-10-01T17:50:25Z Indexed on 2012/09/17 15:38 UTC
Read the original article Hit count: 268

Filed under:
|
|

I'm displaying an animated gif in my application by creating a QLabel, and setting the movie as a QMovie. The problem I'm having is that when the gif is displayed, any part of the image that stays a constant color throughout the animation shows up as the background color. I hope I'm explaining that clearly. Here's the code I'm using to create the animation if that helps:

rewardLabel=new QLabel();
rewardLabel->setCursor(QCursor(Qt::BlankCursor));
rewardLabel->setWindowFlags(Qt::FramelessWindowHint);
rewardLabel->hide();
string movieTemp="animations/"+animationFiles[animationIndex];
QString movieFile(movieTemp.c_str());
rewardMovie=new QMovie(movieFile);
rewardLabel->setMovie(rewardMovie);

Let me know if I need to explain the situation better. Thanks in advance.

© Stack Overflow or respective owner

Related posts about qt

Related posts about animation