Googling suggests that he should .
But the dragdroprobot implementation (on the parent Robot) does not imply:
QRectF Robot::boundingRect() const { return QRectF(); }
What is right, or is there something more subtle?
Baby items are painted directly by the scene not by the parent, but in accordance with the documentation aboutboundingRect() :
boundingRect()
QGraphicsView uses this to determine if an item needs to be redrawn.
, , , . - , .
QGraphicsItem , , .
,
QGraphicsItem::childrenBoundingRect();
, :
QGraphicItemGroup
:
boundingRect() QGraphicsItemGroup .
( , boundingRect , QGraphicsItemGroup QGraphicsItem. , .)
QGraphicItem.shape()
QGraphicsView.items()
, QGraphicItemGroup.shape() QGraphicsView.items(). , .
QGraphicItemGroup.shape()