Items in QGraphics View not starting from the top.
I have a QGraphicsView. I have plotted a series of text in it. However the text starts from the middle of the view and not from the top. Surprisingly, when i say open new file in my application, the text comes properly in place for the newly opened file. It is just the first time, that the text comes misaligned.
If i force the text to align on top by using steAlignment(Qt::AlignTop) then it comes aligned on top, but the vertical scroll bar gets disabled.
Re: Items in QGraphics View not starting from the top.
What do you want to scroll if your scene is smaller than your view?
Re: Items in QGraphics View not starting from the top.
The scene is not smaller than the view.. The scene is quite large.
Re: Items in QGraphics View not starting from the top.
Then alignment wouldn't matter. If it matters then either the scene is smaller than the view or the view is zoomed out so much that the effective scene size is smaller than the view. If I were to guess, I'd say your scene rect is messed up by something.