desch
20th February 2008, 06:38
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
The gif doesn't move at all during process and start moving after the intensive process :D
2)Using a QThread
CThreadMovie::CThreadMovie(QMovie * movie)
{
_movie = movie;
}
void CThreadMovie::run()
{
if (_movie != NULL)
_movie->start();
exec();
}
I launch with this interface:
QMovie * movie = new QMovie(":/throbber");
labelThrobber->setMovie(movie);
// create Thread instance
_threadMovie = new CThreadMovie(movie);
_threadMovie->start();
It doesn't work ;)
So the questions
What do I do wrong?
What should I do?
Thanks to all
David
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
The gif doesn't move at all during process and start moving after the intensive process :D
2)Using a QThread
CThreadMovie::CThreadMovie(QMovie * movie)
{
_movie = movie;
}
void CThreadMovie::run()
{
if (_movie != NULL)
_movie->start();
exec();
}
I launch with this interface:
QMovie * movie = new QMovie(":/throbber");
labelThrobber->setMovie(movie);
// create Thread instance
_threadMovie = new CThreadMovie(movie);
_threadMovie->start();
It doesn't work ;)
So the questions
What do I do wrong?
What should I do?
Thanks to all
David