Nominate our 2022 Qt Champions!

scene.removeItem() how does it work?

  • Hello,

    What is QGraphicsScene.removeItem() executing?

    By default, it removes the item from the scene as well as all of its children.
    I would like to re implement that behavior in order to unparent children before removing the item itself. Is that something possible or should I manually manage the parenting before removing the item? Managing parents before removing might be the easiest way but it doesn't seem to be the cleanest / neatest way.

    I feel like there must be something to override in a sublass somewhere.

    Any idea?

Log in to reply