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

Using QTime in QML should produce a warning

XMLWordPrintable

    • 2b8b7a162be52f8cd6c2bc39f498a1ddfb59dd68

      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()

       

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes