From 43edd81a8b4fa83d7dcdbd9947f0a39e2255a3ab Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sun, 2 Dec 2018 15:31:22 +0000 Subject: [PATCH] Include seconds in datebase field date/time item delegate editor --- item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp b/item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp index fde7b8c13..a666ed323 100644 --- a/item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp +++ b/item_delegates/DateTimeAsSecsSinceEpochDelegate.hpp @@ -41,6 +41,7 @@ public: QWidget * createEditor (QWidget * parent, QStyleOptionViewItem const& /*option*/, QModelIndex const& /*index*/) const override { std::unique_ptr editor {new QDateTimeEdit {parent}}; + editor->setDisplayFormat (parent->locale ().dateFormat (QLocale::ShortFormat) + " hh:mm:ss"); editor->setTimeSpec (Qt::UTC); // needed because it ignores time // spec of the QDateTime that it is // set from