[Qt-interest] repaint()
Andreas Pakulat
apaku at gmx.de
Tue Sep 21 21:39:49 CEST 2010
On 21.09.10 19:42:53, phil prentice wrote:
> Hi Andre
>
> I will certainly bear that in mind. At the moment I do visit the event loop
> via QCoreApplication::processEvents(); inside the continuos loop. Its all
> actually working very well for me at the moment???
> I did not want to go to the extra effort of yet another thread in my
> application when what I am doing seems to work well as it is It just keeps it
> so simple!!
> Also when my application goes into the continuos loop only a subset of
> widgets are enabled. Its almost a special state where the user selects a
> button in order to get continuos feedback from the hardware (drawn as
> graphs).
>
> However I will let you know if things go badly for me, but at the moment as
> I say it seems to work fine.
Usually the problem with people using processEvents is that they want
some gui updates, but mostly no user-interaction and they don't want
other events to be processed. So they have a blocking for loop and
suddenly things are happening in their app that they don't expect to
happen because they thought the loop would block processing. If you use
a separate thread for the blocking-loop (or you can break the loop into
pieces that can be run in intervals using timers) you at least are
planning ahead for events to be processed while the loop is running and
its not hitting you in the back when you don't expect it.
Andreas
--
An avocado-tone refrigerator would look good on your resume.
More information about the Qt-interest-old
mailing list