I defined a QGLWidget:
NLDCanvas->setMinimumHeight(305);
NLDCanvas->setMinimumWidth(460);
NLDCanvas = new QGLWidget;
NLDCanvas->setMinimumHeight(305);
NLDCanvas->setMinimumWidth(460);
To copy to clipboard, switch view to plain text mode
I also defined
ipainter.
setWindow(QRect(50,
50,
100,
100);
QPainter ipainter(this);
ipainter.setWindow(QRect(50,50,100,100);
To copy to clipboard, switch view to plain text mode
Moreover,In the QGLWidget, I reimplemented the mouseMoveEvent(QMouseEvent *e) function.
And I need to pick the items under the position of the cursor.
However, since the e->posF() is according to the physical coordinate, the result does not has the same value of the item's logical coordinate.
How can I get the logical coordinate of the mouse position of the QGLWidget?
Thanks a lot
Bookmarks