From 68f49002ee2b89bbbb78240b0e6f66147e00866c Mon Sep 17 00:00:00 2001 From: nils Date: Sun, 11 Sep 2011 19:59:44 +0000 Subject: show details in different colours in verfiy detail dialog, further commenting and added fillTextEditWithText to textedit git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@530 34ebc366-c3a9-4b3c-9f84-69acf7962910 --- textedit.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'textedit.cpp') 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); -- cgit v1.2.3