Hi all,
I have created a QGraphicsPixmapItem class
I try to re-implement mouse event in .cpp :Code:class plane : public QGraphicsPixmapItem { public: plane(); protected: void mousePressEvent ( QGraphicsSceneMouseEvent * event ); };
but the result shows that , it has never get into the event, so is that possible to trigger mouse event in item class instead of scene class, because some problem is found if I implemented in graphicsScene......Code:void plane::mousePressEvent (QGraphicsSceneMouseEvent * mouseEvent) { qDebug()<<"Touch!!"; }
Thanks in advance.



