Mouse event QGraphicsPixmapItem
-
Hi,
I have a QGraphicsPixmapItem in a view and I would like to do a specific action upon mouse click on this item.. is there a way to set a handler for this event or the only way is to subclass it ?
-
Hi,
AFAIK subclassing QGraphicsPixmapItem would be the easiest way.
Other way would be to "installSceneEventFilter":http://qt-project.org/doc/qt-4.8/qgraphicsitem.html#installSceneEventFilter. But then it would require the filterItem to be subclassed for reimplementing "sceneEventFilter":http://qt-project.org/doc/qt-4.8/qgraphicsitem.html#sceneEventFilter.