diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index d558c58c743..3253fddb3c7 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -7237,9 +7237,10 @@ void TextEditorWidget::cut() void TextEditorWidget::selectAll() { - QTextCursor c = textCursor(); - c.select(QTextCursor::Document); - doSetTextCursor(c); + QPlainTextEdit::selectAll(); + // Directly update the internal multi text cursor here to prevent calling setTextCursor. + // This would indirectly makes sure the cursor is visible which is not desired for select all. + const_cast(d->m_cursors).setCursors({QPlainTextEdit::textCursor()}); } void TextEditorWidget::copy()