Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.0.0
-
None
-
Any platform
Description
Hi,
In Qt5, QGraphicsScene::removeItem() was a constant time operation when the index method was set to 'NoIndex', as stated in the documentation. This efficiency was due to the method QGraphicsSceneLinearIndex::removeItem() which simply removed the indexed items from a QList (constant time operation in Qt5).
Now in Qt6, removing an item from a QList is not a constant time operation any more (due to the QList refactoring). As a consequence, QGraphicsSceneLinearIndex should store indexed items in another container than a QList (like std::list for instance) in order to recover an efficient removeItem() method as it was in Qt5.