If you are not interested in the rich text capability of QTextEdit
you should have a look at QPlainTextEdit
. QPlainTextEdit
is optimized to handle large documents and to respond quickly to user input. It is based on the same technology and concepts as QTextEdit
, but is optimized for plain text handling.
If you for some reason still would want to use QTextEdit
, you can use the function QTextEdit::setPlainText(const QString&)
to insert plain text.