QGraphicsItem translated by QTransform has same pos()
Hello Qt community,
What exactly does
QGraphicsItem::pos()refer to? I have moved an item (inside a QGraphicsScene) using a QTransform (that is, using
m32) but even after the item has been moved,
QGraphicsItem::pos()still returns the position it had before.
could you show your code?
It's explained in QGraphicsItem::pos(). This function returns the coordinates in the parent coordinates. If it has no parent, it's the scene coordinates.