TestDialog: Make use of Qt 5 signals and slots

This commit is contained in:
Lioncash 2020-07-03 08:32:42 -04:00
parent 8f56333249
commit 9c9e5975b2
1 changed files with 3 additions and 3 deletions

View File

@ -8,9 +8,9 @@ TestDialog::TestDialog(QWidget *pParent)
, ui(std::make_unique<Ui::TestDialog>()) , ui(std::make_unique<Ui::TestDialog>())
{ {
ui->setupUi(this); ui->setupUi(this);
connect(ui->spinBox, SIGNAL(valueChanged(int)), this, SLOT(OnSpinBoxChanged(int))); connect(ui->spinBox, qOverload<int>(&QSpinBox::valueChanged), this, &TestDialog::OnSpinBoxChanged);
connect(ui->spinBox_2, SIGNAL(valueChanged(int)), this, SLOT(OnSpinBoxChanged(int))); connect(ui->spinBox_2, qOverload<int>(&QSpinBox::valueChanged), this, &TestDialog::OnSpinBoxChanged);
connect(ui->pushButton, SIGNAL(clicked()), this, SLOT(OnFind())); connect(ui->pushButton, &QPushButton::clicked, this, &TestDialog::OnFind);
} }
TestDialog::~TestDialog() = default; TestDialog::~TestDialog() = default;