[Qt-interest] Controlling when timers run

Glenn Hughes ghughes02138 at gmail.com
Thu Jan 14 22:49:33 CET 2010


No we've had many issues like this in our program that we're porting
to Qt, and as a result we need to carefully control when some of our
timer tasks run. A simple example is an error dialog: something goes
slightly wrong, and an error dialog is displayed... then timers run
and try to do things before the user has chosen how to resolve the
error condition... leading to more errors.
Or, suppose that we want a single shot timer to close off an undoable
task, but in the middle of the task a dialog is displayed, so timers
run and the undo record is closed prematurely.

Because in our program we have control over all the entry points into
our executable, we know the calling context... We can determine when
we have really returned to the main loop, or if we are in an
intermediate loop.

G



More information about the Qt-interest-old mailing list