mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-21 11:31:51 -05:00
Add default QDateTime delegate editor
This commit is contained in:
parent
2e5152ad08
commit
bd07a6e755
23
widgets/DateTimeEdit.hpp
Normal file
23
widgets/DateTimeEdit.hpp
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef DATE_TIME_EDIT_HPP_
|
||||
#define DATE_TIME_EDIT_HPP_
|
||||
|
||||
#include <QDateTimeEdit>
|
||||
|
||||
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
|
Loading…
Reference in New Issue
Block a user