diff options
Diffstat (limited to 'demos')
-rw-r--r-- | demos/textedit/textedit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp index e1f24a1..165c97c 100644 --- a/demos/textedit/textedit.cpp +++ b/demos/textedit/textedit.cpp @@ -262,7 +262,7 @@ void TextEdit::setupEditActions() tb->addAction(a); menu->addAction(a); #ifndef QT_NO_CLIPBOARD - actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty()); + actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText()); #endif } @@ -681,7 +681,7 @@ void TextEdit::cursorPositionChanged() void TextEdit::clipboardDataChanged() { #ifndef QT_NO_CLIPBOARD - actionPaste->setEnabled(!QApplication::clipboard()->text().isEmpty()); + actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText()); #endif } |