Unsolved QGraphicsItem move layer
-
I found only two api: collidingItems() and stackBefore().
collidingItems(A) do not contain A itself, so I can not use collidingItems.indexOf(A) to get the layer of A and then move layer.QList<QGraphicsItem*> collidingItems = scene->collidingItems(scene->selectedItems().first()); collidingItems.at(i)->stackBefore(scene->selectedItems().first());