Qt World Summit: Register Today!

One QGraphicsScene, two QGraphicsViews results in crash

  • 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:
    !http://abload.de/img/capture1saiq.png(debugger output)!

    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.

  • Lifetime Qt Champion


    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

Log in to reply