Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
MyQT last edited by
I have subclassed QGraphicsItem to draw my own customised item in QGraphicsScene.
Subclassed item contains image.
I am able to show it properly. When i tried ot rotate, it is obsered that it's loaction is getting changed.
item's battom part is moving which i don't want. instead of that i want to move it's top portion.
is there any way that we can rotate subclassed QGraphics Item without changing it's botton (base) location?
Thansk in advance.
Items are rotated around their transform origin point, which by default is at (0,0) - upper left corner. You need to specify this origin to whatever you want - center of the image, bottom corner etc. with setTransformOriginPoint(x,y).