c_srikanth1984
29th July 2009, 09:50
Hi
I have a QGraphicsScene scene and Item which inherits the QGraphicsRectItem properties. I am taking points from scene MousePressEvent and MouseReleseevents and Drawing a Rectangle with
QRect(TopLeft,BottomRight)
with both points(MousePressEvent and MouseReleseevents ).
Whem I say
item->rotate(qreal);
the item is been rotated from the topleft point where as i want it to rotate from center of the Rectangle.
Hope u got my point. So, What i need to do to rotate item from its center point.
I have a QGraphicsScene scene and Item which inherits the QGraphicsRectItem properties. I am taking points from scene MousePressEvent and MouseReleseevents and Drawing a Rectangle with
QRect(TopLeft,BottomRight)
with both points(MousePressEvent and MouseReleseevents ).
Whem I say
item->rotate(qreal);
the item is been rotated from the topleft point where as i want it to rotate from center of the Rectangle.
Hope u got my point. So, What i need to do to rotate item from its center point.