[Qt-interest] repaint()
phil prentice
philp.cheer at talktalk.net
Tue Sep 21 21:42:53 CEST 2010
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.
I will keep you posted
Thankyou very much
Phil
On Tuesday 21 September 2010 19:07, Andre Somers wrote:
> 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é
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list