Hi,
I sub-classed QGraphicsSvgItem and QGraphicsLayoutItem to be able to add svg item easily to layouts. I achieved this general goal, but now I have few problems with functions like setRotation(), setPos(), setTransformOriginPoint() (those are the only three I discovered).
I should also add that I was inspired by this
The problems
- setRotation(..) - The item is rotated, but somehow when the layout is resized the item is resized in wrong direction (i.e. you rotated some item by 90° now when you increase width of layout the height of the item is stretched instead)
- setPos(..) - does not seem to work at all
- setTransformOriginPoint(..) - does work only when you change it in paint(..) method itself (Edit: this probably only apply when you set the origin point as boundingRect().center() - the reason is now obvious to me
)
Now, you probably can not help me without source... so, here it is with simple TestCase project
Bookmarks