diff options
Diffstat (limited to 'textedit.cpp')
-rw-r--r-- | textedit.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/textedit.cpp b/textedit.cpp index d7d4ad6..c7939e3 100644 --- a/textedit.cpp +++ b/textedit.cpp @@ -320,6 +320,14 @@ void TextEdit::quote() cursor.endEditBlock(); } +void TextEdit::fillTextEditWithText(QString text) { + QTextCursor cursor(curTextPage()->document()); + cursor.beginEditBlock(); + this->curTextPage()->selectAll(); + this->curTextPage()->insertPlainText(text); + cursor.endEditBlock(); +} + void TextEdit::loadFile(const QString &fileName) { QFile file(fileName); |