Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What is the difference of mousePressEvent() between QGraphicsScene and QGraphicsView?

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 735 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    opengpu
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved