[Qt-interest] qwidget grabmouse weird behaviour

Giancarlo Amati ilferraresebono at hotmail.it
Mon Mar 30 14:03:22 CEST 2009


Hello everybody,

QVTKWidget is a class derived from QWidget...and I'm using the fuction grabMouse to detect the position of the mouse.
Now, I would love the position of the cursor respect the position and the dimension of the widget and not respect my screen resolution, infact:

_ui->qvtkWidget->grabMouse(mc);
 QPoint p = mc.pos();
 printf("Point: %d %d", p.x(), p.y());
 _ui->qvtkWidget->releaseMouse();

where qvtkWidget is the widget. Now mc is filled up with my the position of the mouse respect to the dimensions and resolution of the screen and not respect to the widget itself.
WHY?

Kind Regards.
Giancarlo

_________________________________________________________________
Scopri le keyword più cercate della settimana!
http://clk.atdmt.com/GBL/go/136430524/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090330/9326af9f/attachment.html 


More information about the Qt-interest-old mailing list