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

Using QTime in QML should produce a warning

    XMLWordPrintable

    Details

    • Commits:
      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

          Issue Links

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

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes