Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Mouse press event for graphicsellipseitem
swat last edited by
I have developed widget application with graphicsview and for graphicsview created graphicsscene and when we command send from application and receive data and need to extract range, bearing from data and converting range and bearing into X And y coordinates and plotting into graphicsview using graphicsellipseitem.
Now I am facing an issue that when I click on target I. E graphicsellipseitem I want to get info about clicked item like range, bearing.
Can you please help on this how to write mousepress event for graphicsellipseitem item and how to get info about particular target.
JonB last edited by
As per https://doc.qt.io/qt-5/qgraphicsellipseitem-members.html,
Pl45m4 last edited by Pl45m4
how to get info about particular target.
After you implemented the
mousePressEventyou have to decide if you check, if the
QGraphicsEllipseItemis selected (set
ItemIsSelectableflag first) or if you subclass it and send a signal on
mousePressEvent(or output the item properties directly inside the event function)