C

date QML Value Type

a date value. More...

Detailed Description

The date type represents a time value in milliseconds. Unlike the date type in Qt Quick, the date type in Qt Quick Ultralite is a simplified representation that only stores relative or externally provided time values. It does not support features such as time zones or string-based initialization. The type internally stores a numeric value in milliseconds.

When integrating with C++, the DateTime class provides the native representation of the date value type. Any property, function parameter, or return type declared as DateTime in C++ is automatically exposed to QML as a date value type.

Example:

struct DateObject : Qul::Object
{
    Qul::Property<Qul::PlatformInterface::DateTime> timestamp;
};
QtObject {
    property date boundTimestamp: dateObject.timestamp

    DateObject {
        id: dateObject
    }
}

See also QML Basic Types.

Available under certain Qt licenses.
Find out more.