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

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

XMLWordPrintable

    • macOS
    • 130e06686 (dev), 696daaf05 (6.8)

      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();
      }

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes