[Interest] Qt mouse poll rate too slow

Joshua Grauman jnfo-c at grauman.com
Fri Sep 23 23:26:56 CEST 2016


Hello all,

I'm running into a problem where the mouse (and touchscreen) poll rate is 
too slow for my application. At first I thought it was the device (mouse 
and/or touchscreen), but after trying in different apps, I discovered it 
is Qt. I am simply subclassing a QLabel and adding points to a 
QPainterPath in mouseMoveEvent like this:

MyLabel::mouseMoveEvent(QMouseEvent *e)
{
   if(mouseState==1)
   {
     addPoint(e->pos());
     update();
   }
}

The QPainterPath looks fine when you move the mouse/touchscreen slowly, 
but when moving quickly you can see discrete points at quite a distance 
apart. Is there any way to get Qt to poll faster? Any other ideas for 
getting better precision for mouse events? Thanks!

Josh



More information about the Interest mailing list