Move the text cursor to the end of the document after adding this html snippet. See QTextCursor::movePosition() and QTextEdit::setTextCursor().