Hi,
I try to launch a throbber (just a gif) during intensive process.
1) I tried to launch it directly like
QMovie movie
(":/throbber.gif");
movie.start();
label->setMovie(movie);
...
//intensive process
QMovie movie(":/throbber.gif");
movie.start();
label->setMovie(movie);
...
//intensive process
To copy to clipboard, switch view to plain text mode
The gif doesn't move at all during process and start moving after the intensive process 
2)Using a QThread
CThreadMovie
::CThreadMovie(QMovie * movie
){
_movie = movie;
}
void CThreadMovie::run()
{
if (_movie != NULL)
_movie->start();
exec();
}
CThreadMovie::CThreadMovie(QMovie * movie)
{
_movie = movie;
}
void CThreadMovie::run()
{
if (_movie != NULL)
_movie->start();
exec();
}
To copy to clipboard, switch view to plain text mode
I launch with this interface:
labelThrobber->setMovie(movie);
// create Thread instance
_threadMovie = new CThreadMovie(movie);
_threadMovie->start();
QMovie * movie = new QMovie(":/throbber");
labelThrobber->setMovie(movie);
// create Thread instance
_threadMovie = new CThreadMovie(movie);
_threadMovie->start();
To copy to clipboard, switch view to plain text mode
It doesn't work 
So the questions
What do I do wrong?
What should I do?
Thanks to all
David
Bookmarks