Hi,
I want to select a qgraphicsitem and all it's child items when a select the parent item. How can I do this? Where should I start?
Now only the item which I clicked on is selected.
Thanks!
Hi,
I want to select a qgraphicsitem and all it's child items when a select the parent item. How can I do this? Where should I start?
Now only the item which I clicked on is selected.
Thanks!
Use QList<QGraphicsItem *> QGraphicsItem::childItems() const to get the children list and call void QGraphicsItem::setSelected(true) on all the items in the list. You could add this in a slot connected to void QGraphicsScene::selectionChanged() [signal] of the QGraphicsScene
When you know how to do it then you may do it wrong.
When you don't know how to do it then it is not that you may do it wrong but you may not do it right.
Bookmarks