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.
This commit is contained in:
Bill Somerville 2020-12-07 10:41:33 +00:00
parent e5686cb21f
commit cefc8e2645
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
1 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
#include "logqso.h"
#include <QLocale>
#include <QString>
#include <QSettings>
#include <QStandardPaths>
@ -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});
}