You have to apply the cursor movement by setting the cursor on the text edit:
QTextEdit::setTextCursor()