[Solved] QGraphicsItem::boundingRect() and children
QGraphicsItem::boundingRect()supposed to return the bounding rect of just this item or does this need to include children items too?
Let's assume that I have a
QGraphicsRectItemwith different children where the children are partially inside and partially outside of the rect items rectangle. Do I have to implement the
boundingRect()method so it takes the children into account as well?
You should return the bounding rect of all items.
Have you seen QGraphicsItemGroup?
This may provide an implementation you want.
That is exactly what I need. Thank you very much!