Qt/QPlainTextEdit

Материал из Энциклопедия о программировании
Перейти к: навигация, поиск

QPlainTextEdit is a class, that provides a widget that is used to edit and display plain text.

Examples

Clear the editor:

plain_text_edit->clear(); // unless you know the editor is empty

How to setText for QPlainTextEdit? In Qt QPlainTextEdit easy set text! Append new text:

plain_text_edit->appendPlainText(text);

Qt QPlainTextEdit get text:

// QPlainTextEdit::toPlainText()
QString text = ui->plainTextEdit->toPlainText();

Links