I have the folling code: (textBrowser is a QTextBrowser)
Qt Code:
  1. textBrowser->clear();
  2. textBrowser->append("String with 100 lines of text");
  3. textBrowser->textCursor().movePosition(QTextCursor::Start);
  4. textBrowser->ensureCursorVisible();
To copy to clipboard, switch view to plain text mode 
I thought this would make the beginning of the text visible for the user. But unfortunatly the cursor rest at the end of the text ( textBroser->textCursor().atEnd() returns true ).

I tried a work around with setting an named anchor at the beginning of the test, which works fine - but my app continues to write at the end. If I move to the beginning of the text with the keyboard pressing <ctrl+home> the windows stays very nice at the beginning - the anchor is some pixels lower, and the window continues to scroll.

now - how to move the window to the same state as <ctrl+home> does?

Thanks for your time,
Klaus