Disable QGraphicsItemGroup handle its child events



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


Log in to reply
 

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