Calling collidingItems
when two QGraphicsWidget
s are visible overlapping, but returns null
QGraphicsWidget0
, QGraphicsWidget1
inherit from QGraphicsWidget
.
Eventually I see that icon1
is shown on top, how can I get icon1
to show on the bottom without changing the insertion order?
icon0= new QGraphicsWidget0();
icon1= new QGraphicsWidget1();
scene.addItem(icon0);
scene.addItem(icon1);
icon1->setZValue(-1);
CodePudding user response:
Thanks for the replies guys, I have solved the problem, I had set QGraphicsItem::ItemStacksBehindParent
on some icons causing the other icons to look like setZValue()
was not working.