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

qml date property onValueChanged signal not called when first set to 1/1/1970

    XMLWordPrintable

Details

    • Windows
    • 60deb69034e3d3ac36213ad8c36042ad57c495f7 (qt/qtbase/5.15)

    Description

      Hi,
      In a qml object I set a property of type date, not initialized, called selectedDate (for instance)
      I change its value to 1/1/1970 from a string using Date.fromLocaleDateString
      the signal "onSelectedDateChanged" is not called.
      If I set it to any other valid value the signal is called
      If I then set it to 1/1/1970 (or 01/01/1970), the signl is called.

      Attached a Qt creator project to reproduce it.
      you can enter the date in a TextEdit and validate it by clicking a button.
      The onEditingFinished signal of the TextEdit tests the validity of the date inserted and set it to the date property selectedDate and displays a text to say so
      onSelectedDateChanged signal should then be called and display a text.
      When the first valid date I enter is 1/1/1970, the onEditingFinished text is displayed but not the onSelectedDateChanged text.
      When entering any other valid date, both texts are displayed
      When entering 1/1/1970 again, both texts are displayed

       

      Attachments

        Issue Links

          Activity

            People

              Eddy Edward Welbourne
              mathieut Mathieu TOURNIER
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: