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

Using QTime in QML should produce a warning

    XMLWordPrintable

Details

    • 2b8b7a162be52f8cd6c2bc39f498a1ddfb59dd68

    Description

      Is there a reason QTime::currentTime() does not convert when handed to QML... like QDate and QDateTime do?

       

      engine.rootContext()->setContextProperty("currentDate", QDate::currentDate()); // Can be accessed in QML as "currentDate"

      engine.rootContext()->setContextProperty("currentDateTime", QDateTime::currentDateTime()); // Can be accessed in QML as "currentDateTime"

      engine.rootContext()->setContextProperty("currentTime", QTime::currentTime()); // "currentTime" in QML is empty, needs to be QTime::currentTime().toString()

       

      Attachments

        1. QTimeTest.zip
          4 kB
          Anonymous

        Issue Links

          Activity

            People

              shausman Simon Hausmann
              icwiener Anonymous (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: