[Qt-interest] setMouseTracking

william.crocker at analog.com william.crocker at analog.com
Fri Jan 7 22:18:46 CET 2011



Nikos Chantziaras wrote:
> On 01/07/2011 04:36 PM, "Alexander Carôt" wrote:
>>>>> Sorry, next idea .. .-)
>>> Query QCursor::pos() on a timer?
>> Just tried it and it couldn't be simpler than that ;-)
>> What you propose exactly does what I need !
>>
>> So, basically no need to use the mouseHandlers and setMouseTracking options etc..
>>
>> Right on and thanks a lot to everyone (and esp. Bill for the final idea)
> 
> Of course you should know that this makes your application run code all 
> the time, waking up the CPU even when idle.  Users are known to throw 
> darts at pictures of the developer for stuff like this :-)
>

I agree.
You should query at the lowest acceptable frequency.
You could then scale the frequency up and down with
the apparent mouse velocity.

Bill



More information about the Qt-interest-old mailing list