How to capture Clicked item ID on QGraphicsview/QGraphicsscene/QgraphiscItem
I have drawn GPS data on screen by using QGraphicsview, QGraphicsScene and QGraphicsitem.
Each GPS data point is showing id on the screen.
Now I want to capture item id on which the click event has happened.
I tried to implement this in MousePressevent but not able to find the clicked item ID.
Please let me know if anybody know about this. How to do this?
I don't understand your question, may be you want to use "itemAt()":http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#itemAt or "itemAt()":http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#itemAt-3 at "QGraphicsScene::MousePressEvent":http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#mousePressEvent.
Note that you must pass "scenePos()":http://qt-project.org/doc/qt-4.8/qgraphicsscenemouseevent.html#scenePos to itemAt() as parameter.