Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.7.2, 6.8.0
-
None
-
-
130e06686 (dev), 696daaf05 (6.8)
Description
if you try the following code and enter 1.1.12, you'd expect, according the to docs that it would default to 21th century... But it does to 20th. And that is a regression against Qt5.
#include <QDateEdit>
#include <QHBoxLayout>
#include <QApplication>
int main(int argc, char **argv) {
QApplication app(argc, argv);
QWidget w;
QHBoxLayout layout(&w);
QDateEdit edit(&w);
edit.setDisplayFormat("dd.MM.yy");
QObject::connect(&edit, &QDateEdit::dateChanged, [](const QDate &value) {
qDebug() << "changed value" << value;
});
QDateTimeEdit edit2(&w);
layout.addWidget(&edit);
layout.addWidget(&edit2);
w.show();
return app.exec();
}
Attachments
Issue Links
- resulted from
-
QTBUG-46843 Way to change base year for QDate::fromString 2 digit year parsing
-
- Closed
-
For Gerrit Dashboard: QTBUG-126698 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
602614,2 | Let QDateTimeEdit control the century to use for two-digit years | dev | qt/qtbase | Status: MERGED | +2 | 0 |
603717,2 | Let QDateTimeEdit control the century to use for two-digit years | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |