Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Disable QGraphicsItemGroup handle its child events
AndySM last edited by
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?