QML Basic Type: time

The time type refers to a time value.

To create a time value, specified as "hh:mm:ss":

MyTimePicker { time: "14:22:15" }

To read a time value returned from a C++ extension class, use Qt.formatTime() and Qt.formatDateTime().

Note that when converting historical times to and from javascript that QDateTime and the JS Date object have different methods of calculating historical daylight savings time application. This can lead to variations of one hour when converting to historical local time.

When integrating with C++, note that any QTime value passed into QML from C++ is automatically converted into a time value, and vice-versa.

This basic type is provided by the QML language.

See also QML Basic Types.