What is the difference of mousePressEvent() between QGraphicsScene and QGraphicsView?

  • 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.

  • Moderators

    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.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.