[QGIS-Developer] QDateTimeEdit: setting a useful minimum Date

Mark Johnson mj10777 at googlemail.com
Tue Jul 11 09:28:54 PDT 2017


While working on an overhaul of the QgsSpatiaLiteProvider (for Spatialite
4.5.0), I just completed the portion for setting the default DATE/DATETIME
etc. only to find that for the QDateTimeEdit class, the beginning or the
world is determined by the Act of Parliament of 1751 (Calendar Act) - which
is a disaster for any Historical Database for any event before 1752-09-14.

Therefore it would be a good idea to set the lowest Date that can be
displayed as Qt::ISODate (0001-01-01T00:00:00) for all QDateTimeEdit being
used:
- minimumDateTime(QDateTime(QDate::fromString( "0001-01-01", Qt::ISODate
)));
(QDateTime can store lower Dates, but they cannot be displayed as an
ISODate)

If somebody could give a hint as to where the 'Feature Attributes" Dialog
is, I could try this out tomorrow.

Mark Johnson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170711/97f063de/attachment.html>


More information about the QGIS-Developer mailing list