hitcounter
dpointer
Wednesday, September 15, 2004
 
Idle

You want to process something while your application is in idle state? Look no more, and even no need to understand multithreading programming. This cheap trick is a fabulous replacement for thread (this is also mentioned in QTimer documentation):

 idleTimer = new QTimer( this );
QObject::connect( idleTimer, SIGNAL(timeout()), SLOT(idle()) );
idleTimer->start( 0, FALSE );

Of course this is rather quick-and-dirty. But still on most cases it works rather well. Or, use the real QThread if you don't like.


Comments: Post a Comment

<< Home

Powered by Blogger