That depends on the item - sometimes it's easier to replace one line than to rewrite all your coordinates ;-).
That depends on the item - sometimes it's easier to replace one line than to rewrite all your coordinates ;-).
Bitto / Andreas Aardal Hanssen - andreas dot aardal dot hanssen at nokia
Nokia Software Manager, Qt Development
what about QGraphicsSvgItem. It already implements boundingRect() which returns 0,0 as Point of origin for one Item I'm testing here. Can I also handle that doing a transformation? Redefining boundingRect seemingly isn't an option here ...
Thanx in advance
momesana, you can just use the translate-rotate-translate trick from above, it works for any item and you don't have to modify it / subclass it / change its bounding rect or painting.
wysota, you'd have to translate the bounding rect, the shape, and the painter inside the paint() function. otherwise you'd get painting and collision artifacts.
Bitto / Andreas Aardal Hanssen - andreas dot aardal dot hanssen at nokia
Nokia Software Manager, Qt Development
momesana (10th September 2007)
Bookmarks