PDA

View Full Version : How do I know which item I clicked in a QGraphicsView



di_zou
15th December 2009, 20:13
I have a QGraphicsView with a couple QGraphicsItems being displayed. Is there a signal or some function I can call to know when I clicked an item?
I am looking for something that will return the item I have clicked or remember what the last item I have clicked is.
My end goal is to have a button so that when I click the button it will tell me things about the QGraphicsItem that I have selected.

Lykurg
16th December 2009, 02:48
My end goal is to have a button so that when I click the button it will tell me things about the QGraphicsItem that I have selected.
See QGraphicsScene::selectedItems().