Hi all. I'm new to Qt, just setup ver. 5.0.0. Good to be here.
I'm coding a small app, like a Ms Notepad with tabs for multiple documents. I have a single QPlainTextEdit and QTabBar to change contents of the text edit.
With each open document, to remember where the viewport was set, I save three parameters of its scrollbar: minimum, maximum, and position (tried both sliderPosition and value). When user goes back to the document, I set these values again - min, max, and then value. Problem is, the scrollbar sets itself to more or less offset values, immediately after the setters are called, so my ingenious method of preserving each document's viewport doesn't work. Could you please help me understand why the scrollbar behaves this way, and perhaps help me fix it? Thanks.
P.S. My app is really simple, so I attached the whole thing, should anyone be so kind as to have a look; hope it's alright.
Bookmarks