문제

I do not seem to find anywhere in the documentation how to find which QGraphicsItem belongs to a QGraphicsItemGroup knowing the group. Is this possible?

도움이 되었습니까?

해결책

From the documentation:

A QGraphicsItemGroup is a special type of compound item that treats itself and all its children as one item.

So all group's children belong to the group.

QGraphicsItemGroup is derived from QGraphicsItem, which has this function:

QList<QGraphicsItem *> QGraphicsItem::childItems() const
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top