Skip to content
  • 0 Votes
    5 Posts
    319 Views
    Q

    @Pl45m4 said in QGraphicsScene and event handling:

    Due to optimization, not the whole scene is redrawn after operation, so if somehow some painted path/region of a (re-)moved or resized item exceeds the boundingRect, this area might not get updated. Therefore remains might stay visible.

    This indeed was one problem. The other one was that despite the call to removeItem(), the item stayed in the BSPTree, because the boundingRect changed without a previous call to prepareGeometryChange() (which I had everywhere except in this hidden case). Clearly my fault! Overall, this is not very fault tolerant and also not easy to debug! In a way, it would be nice to have a function that could be called (during debugging) to do some consistency checking, rather than only finding out much later during a paint event.

  • 0 Votes
    6 Posts
    6k Views
    enjoysmathE

    @JEllery

    Thanks so much for solving this. It seems to solve my deletion-crash issue as well. :)