Important: Please read the Qt Code of Conduct -

[solved] Initial QGraphicsView scrollbars positions

  • Hi!
    In my application I have an area for drawing which is nested in QGraphicsView. When I start my program both vertical and horizontal ScrollBars of QGraphicsView are set to the center. But I want them to be set initially to the Top and Left accordingly.

  • @Harb I suspect running the following before showing the view should do it:


  • @Jakob Hey jakob. Tnx for your answer, the reason why I answer so late is because your code didn't work with 0, but it works with 1. I mean:


    Figured out it only today :)

  • @Harb Cool!

    A little tip: somewhere along the way, the forum got an update. Instead of prefixing the title of the thread with [Solved] to mark it as solved, you should now see a Topic Tools button at the bottom right of the original message. There you can select 'Mark as Solved'

Log in to reply