PDA

View Full Version : how to get the position of mouse click on a label



qt_user
9th August 2010, 08:28
I have a label which displays an image. I want to perform two tasks:
1. that when a point is clicked on the image, the point is clicked as 1......and the succeding clicks are accordingly labelled 2,3 and 4 respectively...........
(This should get enabled on a button click). DOUBT:How to retrieve those positions on a mouse click event?
2. When another button is clicked, I am able to draw a rectangle using a brush and save its 4 coordinates.....how to do this?

ChrisW67
9th August 2010, 09:14
Have you looked at QLabel::mousePressEvent() or any of the related event handlers?