Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
One QGraphicsScene, two QGraphicsViews results in crash
Tectu last edited by
I have an application with one QGraphicsScene and one QGraphicsView that works just fine without any problems. Now I want to add another QGraphicsView that renders the same QGraphicsScene just a lot smaller (something like a thumbnail).
However, as soon as I call QGraphicsView::setScene() on the second QGraphicsView the application crashes and not even the debugger can display anything.
Interestingly I see that both QGraphicsViews do render the scene correctly without anything missing. Just as soon as it is done the application freezes completely and I can't do anything anymore.
This is everything that the debugger tells me:
Is there anything that I am missing? There's not much code to show, I really just add a second view (exectly the same way as the first one).
I'd be more than happy to have even just the slightesthint where to look at.
I know it may sound silly but just to rule out the obvious: did you properly initialize the secondary graphics view ?
You should also add the OS as well as Qt version you are using