I am creating a GUI where user needs to interact using QGraphicsView. So what I am doing right now is, I created QGraphicsScene and assigned it to QGraphicsView.
There are supposed to be two layers for drawing: one static and one dynamic.
Static layer is supposed to have objects that are created once at startup while dynamic layer contains multiple items (may be hundred of them) and user will interact will dynamic layer objects.
Currently I am drawing both layers on same scene which creates some lag due to large number of objects being drawn.
So question: Is there any way to assign two or more QGraphicsScene to a QGraphicsView ?
One option might be to implement your own class derived from
QGraphicsScene
that can then render a second 'background' scene in itsdrawBackground
override.Then use as...
I've only performed basic testing but it appears to behave as expected. Not sure about any potential performance issues though.