Important: Please read the Qt Code of Conduct -

Any signal on QGraphicsView/QGraphicsScene that gets emitted when any element in it is selected?

  • Do we have any signal that gets emitted automatically whenever any item in the scene gets selected? Or we must listen to mouse events and iterate across all items to see if it is selected or not? Do we have any other better way? Currently, in item's paint() I'm checking if item isSelected() and performing my action, but I want to know, if we have some signal on scene or view to know if any item under it is selected or not.

  • QGraphicsScene::selectionChanged is the signal you might be looking for.

Log in to reply