[SOLVED]QGraphicsItem, QMatrix and children
-
Hi!
I have QGraphicsTextItem nested in QGraphicsPolygonItem. Every time text is changed, I rescale parent using QMatrix class with setMatrix method.
But then children ( text item in my case) also get resized and I'm back at square one.
I haven't found anything useful in docs.
The only solution that I've found is to loop through polygon points and move them by scale factor in desired direction.Is there any easier solution for this?
-
Maybe, it helpy to set the item flag QGraphicsItem::ItemIgnoresTransformations.
It avoids a child item to react on parents transformation changes. -
have you implement the method QGraphicsItem::itemChange () ?
may be it will solve the problem ? -