HowTo resize Subclasses of QGraphicsItem
-
Assuming you mean "How do I create a resize-able custom QGraphicsItem?", the subclass needs to handle the mouse events to process a press-move-release sequence as a resize operation. During the operation, call prepareGeometryChange() and change the value which will be returned by the boundingRect().
-
[quote author="Bradley" date="1293081440"]Assuming you mean "How do I create a resize-able custom QGraphicsItem?", the subclass needs to handle the mouse events to process a press-move-release sequence as a resize operation. During the operation, call prepareGeometryChange() and change the value which will be returned by the boundingRect().[/quote]
Well. This change the bounding rect of item. But the size of content is still the same. I need to resize content too within the new bounding rectangle.
Thx.