[Qt-interest] repaint()

Andre Somers andre at familiesomers.nl
Tue Sep 21 21:07:16 CEST 2010


  Op 21-9-2010 21:03, phil prentice schreef:
> On Tuesday 21 September 2010 17:49, Frank Lutz wrote:
>> As i can remamber you do not need to repaint(), or update. The
>> Application updates by itself.
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
> What I am doing is a bit different in that my App is stuck in a continuos for
> loop (talking to the hardware) and I have to force a repaint in order to
> update the screen.
That is probably not a good idea. Qt needs the eventloop to run with 
some frequency to make the app behave properly. For instance, your app 
needs to respond to user interaction. In your design, that will not work 
properly. Perhaps you should rethink your design a bit. If you really 
need to talk to the hardware continuously, you might use a separate 
thread. You can then use signals from the worker object running in the 
thread to the GUI to update your graphs.

André




More information about the Qt-interest-old mailing list