I'm not having a problem with prepareGeometryChange(), I just wish I understood how it works. I tried looking at the source, but it wasn't very helpful for me. According to the docs it "Prepares the item for a geometry change. Call this function before changing the bounding rect of an item to keep QGraphicsScene's index up to date. prepareGeometryChange() will call update() if this is necessary."
Does "before" mean *right* before? Any time before? Does this mean I don't need to call update()?
Here is an example of where it becomes confusing: Say I have a QGraphicsItem subclass whose boundingRect() function returns a rectangle that is a static class member. If I want update the static rectangle, do I have to call prepareGeometryChange() on every instance of the class, update the static rectangle, and then call update() on every instance?
Bookmarks