Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to move QGraphicsView in a QGraphicsScene



  • Hello everybody,

    I don't understand it. I have a large QGraphicsScene, maybe 3000x3000px and I have a QGraphicsView with 1000x1000px. How do I show position 2000x2000 of the scene in the graphics view?

    I can use horizontalScrollbar()->scroll(1000, 1000), I can use centerOn, I can change the sceneRect(1000, 1000....). But I don't know the right way.

    Does anybody know how to do this?

    Thank you

    Morfio


  • Moderators

    All the solutions you listed are correct.


Log in to reply