Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-126698

[REG 5->6] QDateEdit defaults to 20th century

    XMLWordPrintable

Details

    • macOS
    • 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

          For Gerrit Dashboard: QTBUG-126698
          # Subject Branch Project Status CR V

          Activity

            People

              Eddy Edward Welbourne
              thierryb Thierry Bastian
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes