try:
.. do your changes..
QTextCursor tc = ui->textbox->textCursor();
tc.setPosition(ui->textbox->document()->characterCount());
ui->textbox->setTextCursor(tc);
Edit: misread your question at first and thought, you wanted to save/restore the cursors position.
HIH
Johannes
Bookmarks