From cefc8e26452375c2188976f1ee6c079721cd38ab Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Mon, 7 Dec 2020 10:41:33 +0000 Subject: [PATCH] Use the system localized short date format for Log QSO dialog dates This brings these fields into line with other QSO start and end date/time fields elsewhere in the user interface. Note that time entry and edit fields use a fixed hh:mm:ss 24-hour clock format consistent with UTC usage and of suitable accuracy for logging QSOs. --- widgets/logqso.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/widgets/logqso.cpp b/widgets/logqso.cpp index 7a74b86cf..f49274494 100644 --- a/widgets/logqso.cpp +++ b/widgets/logqso.cpp @@ -1,5 +1,6 @@ #include "logqso.h" +#include #include #include #include @@ -61,6 +62,9 @@ LogQSO::LogQSO(QString const& programTitle, QSettings * settings ui->comboBoxPropMode->addItem (prop_mode.name_, prop_mode.id_); } loadSettings (); + auto date_time_format = QLocale {}.dateFormat (QLocale::ShortFormat) + " hh:mm:ss"; + ui->start_date_time->setDisplayFormat (date_time_format); + ui->end_date_time->setDisplayFormat (date_time_format); ui->grid->setValidator (new MaidenheadLocatorValidator {this}); }