What is the difference of mousePressEvent() between QGraphicsScene and QGraphicsView?
opengpu last edited by
I set a QGraphicsScene to a QGraphicsView.
but i saw they both have mousePressEvent, mouseReleaseEveent, what is the difference?
and i tried QGraphicsView, it seems not worked for mousePressEvent, but the mouseWheelEvent does work.
You can have a single Scene be rendered in 2 different Views. Having mouse events in both gives you greater control and flexibility.
And, apart from that, all QWidgets have handlers for those events.