I have around 1000 graphics item in my QGraphicsScene. I want to move all of these 1000 items to new position. New positions don\'t relate to each other and all
A substantial speed up of setPos() in dynamic scenes can be achieved with:
QGraphicsScene scene;
scene.setItemIndexMethod(QGraphicsScene.NoIndex);
This is much faster than the default QGraphicsScene.BspTreeIndex for dynamic scenes, but comes at a cost, as events that need to query the QGraphicsScene will now be substantially slower (e.g. hover events).
Another way to speed things up is to reduce the total number of objects. If the scene uses a lot of QGraphicsItemGroup, one can try to replace them with a plain QGraphicsItem and override it's paint() method instead of using child objects.
That said, even with this optimizations in place I find the performance of QGraphicsScene still pretty miserable once you go beyond a few hundred objects. QtQuick seems to handle large object collections much better.