Hi, I am writing codes to load in image from a file and did some edits on this image(change some pixels' value), zoomed in or zoomed out and then save the image.
Also, I want to know the location in the original image associated to a click on the qgraphicsscen. Up till now, I can not find any function useful.

My codes for loading image:
qgraphicsscene = myqgraphicsview->getScene();
qgraphicsscene->setSceneRect(image->rect());
myqgraphicsview->setScene(qgraphicsscene);
qgraphicsscene->addPixmap(QPixmap::fromImage(*image));

My codes for editing:
mousePressEvent(QMouseEvent * e){
QPointF pt = mapToScene(e->pos());
scene->addEllipse(pt.x()-1, pt.y()-1, 2.0, 2.0,
QPen(), QBrush(Qt::SolidPattern));}
I want to know the relationship between e->pos() and the exact location in the original image.