I am using a QGraphicsScene to display a very large number of items, often more than 100,000. When I call delete the scene, it takes an unusually long time to complete, 10 seconds or more.
A bit of experimenting revealed that the QGraphicsScene::clear function is the slow part. If I clear first and then delete, the clear is slow but the delete is fast.
Why is the QGraphicsScene destructor/clear function so slow, and is there any way I can speed it up?