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. Disable QGraphicsItemGroup handle its child events
Forum Updated to NodeBB v4.3 + New Features

Disable QGraphicsItemGroup handle its child events

Scheduled Pinned Locked Moved General and Desktop
qgraphicsview f
1 Posts 1 Posters 848 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.
  • A Offline
    A Offline
    AndySM
    wrote on last edited by
    #1

    I have a QGraphicsItemGroup that consists of three QGraphicsItems. I want to be able catch mousePressEvents for each individual QGraphicsItem within that group, but QGraphicsItemGroup catches all them and does not let propagate to its child items.

    There is setFiltersChildEvents that is True by default for QGraphicsItemGroup, that's why it catches those events. When I change setFiltersChildEvents to False it makes no difference and QGraphicsItemGroup still catches events that I want to be able propagate to child items.

    Also there is setHandlesChildEvents which is marked as Obsolete Member. When I try to use setHandlesChildEvents (which is True by default for QGraphicsItemGroup) and set it ti False, everything works: three child QGraphicsItems are able to receive mousePressEvents.

    Question: How to catch mousePressEvents for each individual QGraphicsItem within QGraphicsItemGroup using setFiltersChildEvents?

    Thank you.

    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