[Qt-interest] Handling mouse events in soft-realtime case
Karol Krizka
kkrizka at gmail.com
Fri Jul 31 15:31:24 CEST 2009
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
Cheers,
Karol Krizka
More information about the Qt-interest-old
mailing list