Get pixel position under mouseclick in QGraphicsPixmapItem
Solved
General and Desktop
-
What I want to achieve
I want to create a QGraphicsViewer that can zoom in,out and get the position of a pixel under mouseclick from an image.What I did so far
I've successfully created my QGraphicsViewer that can zoom in on the image.Problem
How to get the pixel position (X,Y) of the image under the mouseclick? A simple mouseclick event is not working as it's not taking into account that the image scales after zooming see image bellow.No Zoom: Notice the pixel at 2,2 at the top.
After Zooming: pixel at 2,2 is different from the first image.