From bc635f0cd7457dd3704813f150b3c80e1e9c4e6f Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Fri, 1 Jul 2022 11:56:22 -0400 Subject: [PATCH] Make OK button the default on the LogQSO dialog window. --- widgets/logqso.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/widgets/logqso.cpp b/widgets/logqso.cpp index f49274494..e87a88520 100644 --- a/widgets/logqso.cpp +++ b/widgets/logqso.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "logbook/logbook.h" #include "MessageBox.hpp" @@ -109,6 +110,15 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString Radio::Frequency dialFreq, bool noSuffix, QString xSent, QString xRcvd) { if(!isHidden()) return; + + QPushButton* okBtn = ui->buttonBox->button(QDialogButtonBox::Ok); + okBtn->setAutoDefault(true); + okBtn->setDefault(true); + okBtn->setFocus(); + QPushButton* caBtn = ui->buttonBox->button(QDialogButtonBox::Cancel); + caBtn->setAutoDefault(false); + caBtn->setDefault(false); + ui->call->setText (hisCall); ui->grid->setText (hisGrid); ui->name->clear ();