How to get cursor click position in QGraphicsItem coordinate system?
问题 I have a QGraphicsScene with QGraphicsItem added to it. Suppose I clicked on a map image ( QGraphicsItem ) where green circle is drawn. How to get click position in terms of this QGraphicsItem and not QGraphicsScene coordinate system. P.S. Please, don't write code with mouse event handling. Just how to map click position correctly. Thanks in advance. 回答1: The idea is to convert the coordinate with respect to the scene to a coordinate with respect to the item. - Override mousePressEvent in