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:
Gabriel de Dietrich 2018-04-09 17:07:03 -07:00
parent eba996edcc
commit a6c7eeacdc

View File

@ -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