summaryrefslogtreecommitdiffstats
path: root/examples/widgets/richtext/textedit
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/richtext/textedit')
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp
index 002574bcd7..0cc5204675 100644
--- a/examples/widgets/richtext/textedit/textedit.cpp
+++ b/examples/widgets/richtext/textedit/textedit.cpp
@@ -141,7 +141,9 @@ TextEdit::TextEdit(QWidget *parent)
#ifndef QT_NO_CLIPBOARD
actionCut->setEnabled(false);
+ connect(textEdit, &QTextEdit::copyAvailable, actionCut, &QAction::setEnabled);
actionCopy->setEnabled(false);
+ connect(textEdit, &QTextEdit::copyAvailable, actionCopy, &QAction::setEnabled);
connect(QApplication::clipboard(), &QClipboard::dataChanged, this, &TextEdit::clipboardDataChanged);
#endif