Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.3.1
-
None
Description
If an item is transformed (eg: translated) and then added to a QGraphicsItemGroup, the scene rect of the QGraphicsScene should only expand to the boundingRect() of the item. However, when the QGraphicsItemGroup::addToGroup() function transforms the coordinates of the item so that it is still placed correctly on the scene, the sceneRect may grow larger than expected. Since the addToGroup() function is documented to maintain the position of the item relative to the scene, one would expect that the size of the sceneRect() does not change either.
Update: You can easily work around this problem by setting the scene rect explicitly.