Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, April 2007
Mouse events at edge of screen


Message 1 in thread

I want to be able to track mouse movements over large distances. I am
going to hide the hardware cursor and use the mouse for managing the
display of objects. The problem is that once the (hidden) cursor hits
the edge of the screen it obviously stops moving, and I stop getting
QMouseEvents which properly inform my app of how the mouse is being
moved.

How can I receive accurate mouse events without the problem of the
cursor hitting the edge of the display?

I tried one approach, which is to reset the (invisible) hardware
cursor to the middle of the screen (QCursor::setPos) every time
receive a mouse move event. I would then use mouse offset information
to do my manipulation (instead of absolute mouse positions).
Unfortunately, it seems that OS X is somehow coalescing mouse events.
I think that every time I move the QCursor OS X is counting that as a
mouse move, and that event is coalesced with the actual mouse events I
want. The two cancel each other out, and I get a stream of mouse move
events all with the same x,y coordinate, namely where I positioned the
QCursor.

Any help?

Thanks,
Garth

--
 [ signature omitted ]