I am drawing an image in my QMainWindow and I need to get the position of the mouse when it's clicked, so that I can tell where on the image the user clicked. Is there an easy way to do this?
Thanks a lot for your help
I am drawing an image in my QMainWindow and I need to get the position of the mouse when it's clicked, so that I can tell where on the image the user clicked. Is there an easy way to do this?
Thanks a lot for your help
Via the mouse press event.
http://doc.qt.nokia.com/4.6/qmouseevent.html
If you have a mouse event use that, otherwise you can also see QCursor::pos().
Bookmarks