[Qt-interest] Handling mouse events in soft-realtime case
Martin Hofius
Martin at hofius-online.com
Mon Aug 3 11:08:25 CEST 2009
Hi,
Am Freitag, 31. Juli 2009 schrieb Karol Krizka:
> On Fri, 2009-07-31 at 12:34 +0300, İsmail Dönmez wrote:
> > Hi,
> >
> > On Fri, Jul 31, 2009 at 12:03 PM, Oliver
> >
> > Demetz<forenbeitraege at oliverdemetz.de> wrote:
> > > Well,
> > > your right, as long as you are still in your paint event, no new event
> > > can be taken into account.
> > > But then the point to tune your app is your paint event, which has to
> > > become faster. Think about which parts of your painting can be cached
> > > st. they dont cost computation time in every event.
> >
> > Isn't there a possible way to always get mouse events via a thread or
> > something?
>
> Nope, since all GUI events have to be handled through the GUI thread (so
> the main thread). However, you can try to use this function at random
> points in your painting code:
> http://doc.qtsoftware.com/4.5/qcoreapplication.html#processEvents
in addition to this you can build a (linked) list of mouse events and process
these (self made buffer) in your paint event.
Maybe you can archive some improvements by using OpenGL or leaving out
unnessesary paints.
Greetings
Martin
>
> Cheers,
> Karol Krizka
>
> _______________________________________________
> 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