forked from qt-creator/qt-creator
Utils: Add shortcut for buttons in environment dialog
Task-number: QTCREATORBUG-27887 Change-Id: Ifb52d24354b1042cdb1ccb4ca898a251cbac1039 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLabel>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QPushButton>
|
||||
#include <QSet>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
@@ -95,6 +96,8 @@ NameValuesDialog::NameValuesDialog(const QString &windowTitle, const QString &he
|
||||
auto box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
|
||||
Qt::Horizontal,
|
||||
this);
|
||||
box->button(QDialogButtonBox::Ok)->setText(tr("&Ok"));
|
||||
box->button(QDialogButtonBox::Cancel)->setText(tr("&Cancel"));
|
||||
connect(box, &QDialogButtonBox::accepted, this, &QDialog::accept);
|
||||
connect(box, &QDialogButtonBox::rejected, this, &QDialog::reject);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user