textedit example: Fix disabled Cut/Copy menu items
This amends commit fe1ea010b9
.
Change-Id: Ia1f9fa4a6dd4481b5295df986f882f1120c3d8b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
eba996edcc
commit
a6c7eeacdc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user