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. [Solved] QGraphicsWidget subclass does not recieve GraphicsSceneMouseRelease

[Solved] QGraphicsWidget subclass does not recieve GraphicsSceneMouseRelease

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.8k Views
  • 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on 6 Dec 2012, 16:44 last edited by
    #1

    Qt 4.8.1, VS 2010 on Windows

    I have a QGraphicsWidget subclass that should handle some events. Whatever I do, I do not receive the GraphicsSceneMouseRelease event.

    I have reimplemented mouseReleaseEvent, and never get in there.
    I have reimplemented sceneEvent, and get everything but the mouse release event.
    I have reimplemented event, and get everything but the mouse release event

    I have not installed a filter on my object.
    I have not installed a scene filter, nor an application-wide event filter.

    I have checked for bugs containing GraphicsSceneMouseRelease , and found none that matches my problem.

    Ideas?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Asperamanca
      wrote on 7 Dec 2012, 08:37 last edited by
      #2

      Ok, the trick here is to become the mouse grabber. Interestingly, the docs say (about mousePressEvent) that

      bq. If you do reimplement this function, event will by default be accepted (see QEvent::accept()), and this item is then the mouse grabber.

      However, that didn't happen. I had to accept the event myself, then did the mouseReleaseEvent arrive.

      1 Reply Last reply
      0

      1/2

      6 Dec 2012, 16:44

      • Login

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