Both the QGraphicsView and QGraphicsItem response to the mousePressEvent?
i overrider mousePressEvent for both QGraphicsView and QGraphicsItem to get mouse right button down event...but both of them get the event...and I just want the QGraphicsItem get the event...how to prevent it from the QGraphicsView?
ps. and I tried contextMenuEvent of the QGraphicsItem, it woks the same.
When you reimplement the event handlers, the event is by default accepted and it does not propagates further. If you are reimplementing mousePress, also reimplement mouseRelease. Post your code if you still face the problem.
i just override the 2 mousePress func in the 2 classes...and at last in the func, call the mousePress of QGraphicsView and QGraphicsItem
LIke I said, did you reimplemented the mouse release also? Do that and reply with the results.
Post some code here, so that we can get some idea of whats going wrong...
You may like to read this