PDA

View Full Version : how to use Qcursor to move the mouse cursor



jack_shen
23rd December 2009, 02:35
hi,

i am new to qt.
here is my problem:
i want to move the mouse cursor in a QWebView widget. so i use Qcursor::setPos() to change the postion of the mouse cursor. and setPos() is called in the event() function ( i reimplement it ). but when it runs, the mouse cursor dosent move at all. but when setCursor(Qt::CrossCursor) is called, the shape of the cursor does change, and position returned from pos() alse changed. but the cursor doesnt move at all
i dont know if it is nessecery to call other flush function to reflush the screen.

thks

jack_shen
23rd December 2009, 05:36
no replay?

Piskvorkar
21st March 2010, 08:20
Hi, I've simillar problem. On Win XP it is functional (when a call QCursor::setCursor(...), cursor is moved right), but on Ubuntu 9.10 cursor doesn't move, however X seems to think that cursor is in changed positoin (tool tip on (10,10) is displayed) :-(.

zgulser
22nd March 2010, 07:20
You reimplement mouseMoveEvent?