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

Reg->6.3.1: Passing a QDate to QDateEdit via constructor results in wrong date

    XMLWordPrintable

Details

    • Linux/X11
    • 1
    • 607c5a90c5 (qt/qtbase/dev) 607c5a90c5 (qt/tqtc-qtbase/dev) e6070412d3 (qt/qtbase/6.3) 09268a5702 (qt/qtbase/6.4) e6070412d3 (qt/tqtc-qtbase/6.3) 09268a5702 (qt/tqtc-qtbase/6.4)
    • Foundation Sprint 63

    Description

      This example code shows the Bug:

      from PySide6.QtWidgets import QApplication, QDateEdit
      from PySide6.QtCore import Qt, QDate
      import sys
      
      app = QApplication(sys.argv)
      
      date = QDate.fromString("2022-08-02", Qt.DateFormat.ISODate)
      print(date.toString(Qt.DateFormat.ISODate))
      edit = QDateEdit(date)
      edit.show()
      
      sys.exit(app.exec())
      

      If you execute this code, it will print the correct date (2022-08-02), so this works. But the QDateEdit will have 2022-08-01, which is the wrong date selected.

      Attachments

        1. pyside2018.py
          0.7 kB
        2. qtbug105322.jpg
          qtbug105322.jpg
          24 kB
        3. qtbug105322.zip
          0.9 kB
        For Gerrit Dashboard: QTBUG-105322
        # Subject Branch Project Status CR V

        Activity

          People

            Eddy Edward Welbourne
            jakobdev Peter Hase
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: