[email protected]
[Top] [All Lists]

Re: how to break the loop

Subject: Re: how to break the loop
From: Kuba Ober
Date: Mon, 13 Dec 2004 16:33:32 -0500
>    while ( continueLooping && !stopClicked ) {
>      qApp->processEvents();

I'd suggest that unless you really know what you're doing, consider 
processEvents() method non-existent. It will avoid potential problems later 
as your code grows.

It'll also force you to either re-evaluate your loop design, or to move the 
non-gui loop over to another thread. It's a worthwhile exercise, at least to 
me it was. In the Qt headers that I'm using in my projects, I've simply made 
processEvents() protected.

Cheers, Kuba Ober

List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>