Merge pull request #6478 from spycrab/qt_default_btns

Qt: Replace "OK" with "Close" buttons
This commit is contained in:
Léo Lam
2018-03-26 22:48:26 +02:00
committed by GitHub
7 changed files with 21 additions and 21 deletions

View File

@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include <QDialogButtonBox>
#include <QPushButton>
#include <QTabWidget>
#include <QVBoxLayout>
@ -52,9 +53,11 @@ PropertiesDialog::PropertiesDialog(QWidget* parent, const UICommon::GameFile& ga
layout->addWidget(tab_widget);
QDialogButtonBox* ok_box = new QDialogButtonBox(QDialogButtonBox::Ok);
connect(ok_box, &QDialogButtonBox::accepted, this, &PropertiesDialog::accept);
layout->addWidget(ok_box);
QDialogButtonBox* close_box = new QDialogButtonBox(QDialogButtonBox::Close);
connect(close_box, &QDialogButtonBox::rejected, this, &QDialog::reject);
layout->addWidget(close_box);
setLayout(layout);
}