back soft

مطالب مرتبط با «removeItem with custom» در back soft | نویسنده: استخدام کار

Crash after QGraphicsScene::removeItem() with custom item class

Vote count: 0 I am populating a QGraphicsScene with instances of a custom item class (inherting QGraphicsPathItem). At some point during runtime, I try to remove an item (plus its children) from the scene by calling: delete pItem; This automatically calls QGraphicsScene::removeItem(), however it also leads to a crash in the class QGraphicsSceneFindItemBspTreeVisitor during the next repaint. asked 24 secs agoPhilip Allgaier 1 Answer Vote count: 0 TL;DR: The solution is to ensure that QGraphicsItem::prepareGeometryChange() gets called before the item's removal from the scene. The problem is that during the item removal from the scene, the scene inteal index was not properly updated, resulting ...

ادامه مطلب