C++ (Qt)QTextCursor cursor = editor->textCursor();cursor.movePosition(QTextCursor::Start);editor->setTextCursor(cursor);