[Qt-interest] Controlling when timers run
Andreas Pakulat
apaku at gmx.de
Fri Jan 15 15:30:47 CET 2010
On 15.01.10 06:42:41, william.crocker at analog.com wrote:
>
> > So, one possible solution to this would be to maintain a list of timers
> > and either stop these or block their signals just before you call
> > QDialog::exec() (or any other nested event loop) and then re-enable or
> > unblock their signals once QDialog::exec() returns.
>
> The problem here is that many apparently innocuous activities
> process events as a side effect. I believe the following are
> examples:
>
> void QStatusBar::showMessage(...)
> void QProgressBar:: ...
>
> This pisses me off to no end.
Uhm, huh? QStatusBar::showMessage() doesn't process any events. All it does
is schedule a paint event and a timer event. And QProgressBar has no
showMessage() function.
AFAIK the functions that create a local event loop are clearly documented
as such, in particular those are usually called ::exec() and belong to
classes that block user input from the rest of the application. And
processEvents is not called in any widget or the like, only in QApp and
QEventLoop related classes.
Andreas
--
You will gain money by a fattening action.
More information about the Qt-interest-old
mailing list