Events with QGraphicsItemGroup

后端 未结 3 1818
忘掉有多难
忘掉有多难 2020-12-20 12:22

In my application I want to use QGraphicsItemGroup for grouping items into one item.
I played with it a little and not sure using it because when I want to catch events

3条回答
  •  攒了一身酷
    2020-12-20 12:58

    You need to call QGraphicsItemGroup::setHandlesChildEvents(false). This stops the QGraphicsItemGroup trying to handle the event, and lets the child QGraphicsItems handle them instead.

提交回复
热议问题