activate and deactivate a gif
Unsolved
General and Desktop
-
hello
I want when I press a button I activate the gif and when I press another button the gif will be stopped.
The probleme is when I press to reactivate the gif for the second time the application crashes you find if attached my code:
.h:
QMovie *movie=new QMovie(":/images/foo.gif");//the first button
if (!movie->isValid())
{
// Something went wrong :(
}
ui->label->setMovie(movie);
movie->start();//second button
movie->stop(); -
Hi and welcome to devnet,
Are you deleting your movie object at some point ?
Did you try to run your application through a debugger ?