[Qt-interest] MouseMove response time resolution

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Tue Nov 30 09:49:24 CET 2010


Alex wrote:

> Hi all,
> 
> I just checked the mouseMoveEvent handler in terms of 
> response time resolution. In that context it seems that it 
> does not notice events, which occur within a time frame of 
> approx. 15 ms.
> 
> What I did: I have a thread, which executes each 1.3 ms. Into 
> this thread I plot the mouseX and mouseY coordinates (updated 
> in the mouseMoveEvent according to event->globalX and 
> event->globalY) while dragging the mouse quickly from a to b 
> and so forth. With each execution I hoped to see the updated 
> x and y coordinates for the respecive mouse position. 
> However, it takes 12 circles to see a coordinate update, 
> which makes me believe that the corresponding mouseMoveEvent 
> is not updating in the desired time response resolution.
> 
> In this correct or is there a way how to improve the time resolution ?
> 
> Thanks in advance and best regards

Which Qt and OS versions are you using?  How are you measuring the
timestamps? 

In Win XP, the default system resolution is 15ms, unless a running process
has changed to a better value.  I have found even after changing the process
res, that QTime::currentTime in 4.6.0 using GetLocalTime still only had 15ms
res.  I ended up having to use the QueryPerformanceCounter interfaces to get
better resolution for measurments.  

Hope that helps, 

Tony.





More information about the Qt-interest-old mailing list