size QML Basic Type
The size
type refers to a value with has width
and height
attributes.
For example, to read the width
and height
values of the Image::sourceSize size-type property:
To create a size
value, specify it as a "width x height" string:
Or use the Qt.size() function:
When integrating with C++, note that any QSize or QSizeF value passed into QML from C++ is automatically converted into a size
value, and vice-versa. When a size
value is passed to C++, it is automatically converted into a QSizeF value.
See also QML Basic Types.