Hi,
I have modified scribble example (found at following link) code to capture leaveEvent and keyPressEvent.
http://doc.trolltech.com/4.5/widgets-scribble.html
And whenever this event occurs, within this event handler i am doing QCursor::setPos(x, y) to reposition my mouse pointer to within mainwindow boundary area. And inside keyPressEvent handler i am moving the cursor by 1 pixel when ever the direction keys are pressed. Whenever the leaveEvent occurs because of the keypresses made to move out of the boundary, I am unable to set mouse Pointer position in the same event iteration. However i have to press one extra key to update the mouse pointer.
Also though i have configured setMouseTracking(true) in my constructor, I am unable to get MouseMove Events.
Am i missing something trivial here ?




Reply With Quote
Bookmarks