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

QQuickMonthGrid uses QDate for Cell instead of QDateTime despite documentation recommending QDateTime

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.8.3, 6.9.0
    • Quick: Controls 2
    • None
    • All

    Description

      In QQuickMonthGrid.cpp, the value of the cell is represented by a QDate.

      However, Qt's own documentation suggests the use of QDateTime. See the following page and the excerpt below. https://doc.qt.io/qt-6/qml-date.html

       

      "When integrating with C++, note that any QDate or QDateTime value passed into QML from C++ is automatically converted into a date value, and vice-versa. Note, however, that converting a QDate will result in UTC's start of the day, which falls on a different date in some other time-zones. It is usually more robust to convert the QDate via a QDateTime explicitly, specifying local-time or a relevant time-zone and selecting a time of day (such as noon) that reliably exists (daylight-savings transitions skip an hour, near one end or the other of a day)."

       

      This bug likely relates to this one: https://bugreports.qt.io/browse/QTBUG-72208

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            jordanangel Jordan Angel
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes