PDA

View Full Version : QGraphicsScene and selection



Harrold
2nd August 2012, 01:17
Hi Guys,

I have a QGraphicsScene, I can put items onto the scene and that works fine. I can move the items around too, which is no problem at all either. Now, what I don't understand is, after I moved an item around in the scene, how can I update it's coordinates and store them or update an existing variable? Any ideas or tips? Also what I don't understand is, how can I get the current selected item in the scene?

skycrestway
2nd August 2012, 03:40
See QGraphicsScene::selectedItems() for a list of selected items. Also, notice the QGraphicsScene::selectionChanged() signal.