From 851b658298afb9bafeda98ffbfa2ade612c656be Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Sun, 2 Jun 2019 22:17:11 +0200 Subject: New upstream version 2.1.0~rc6+repack --- widgets/DateTimeEdit.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 widgets/DateTimeEdit.hpp (limited to 'widgets/DateTimeEdit.hpp') diff --git a/widgets/DateTimeEdit.hpp b/widgets/DateTimeEdit.hpp new file mode 100644 index 00000000..ad767a55 --- /dev/null +++ b/widgets/DateTimeEdit.hpp @@ -0,0 +1,23 @@ +#ifndef DATE_TIME_EDIT_HPP_ +#define DATE_TIME_EDIT_HPP_ + +#include + +class QWidget; + +// +// DateTimeEdit - format includes seconds +// +class DateTimeEdit final + : public QDateTimeEdit +{ +public: + explicit DateTimeEdit (QWidget * parent = nullptr) + : QDateTimeEdit {parent} + { + setDisplayFormat (locale ().dateFormat (QLocale::ShortFormat) + " hh:mm:ss"); + setTimeSpec (Qt::UTC); + } +}; + +#endif -- cgit v1.2.3