[Qt-interest] QCursor::setPos very slow on OSX

David Forstenlechner dforsten at newtek.com
Tue Sep 8 11:21:51 CEST 2009


The solution you described is what we do currently to minimize the
problem (except that we keep the cursor hidden)

But it causes a disturbing delay every time a user tries to increase a
value using a drag button near the right edge of the screen, as well as
on finishing the mouse drag, which is a very common case.

These delays prevent precise changes to the value the drag button
controls, which is an absolute requirement.

A possible workaround would be to prevent Qt from moving the mouse
cursor on mouse drags, and process the mouse movements directly in the
drag button widget,
but I do not know if/how that is possible.

The best solution would be if the OSX QCursor::setPos() would be fixed
and implemented in a sensible way.

- DavidF

Ender EREL schrieb:
> I don't know the solution to your problem but I have a suggestion. The 
> behaviour you explained exists in 3D Studio Max. When dragging the 
> cursor, if the mouse hits a border of the screen, it is positioned on 
> the opposite border as if the screen surface wraps around its own. So, 
> when the mouse passes the right border, it comes out of the left border 
> and dragging continues smoothly.
> 
> If you implement it this way, only one call to setPos will be needed 
> instead of numerous calls when the mouse passes a border. Also, 
> personally i find that approach more intuitive. Dragging (cahnging the 
> value) without the cursor moving feels a bit odd.
> 
> As i said, this is not a solution, more like a workaround.
> 
> Best Regards.
> 




More information about the Qt-interest-old mailing list