分享

QML Basic Types | Documentation | Qt Project

 oskycar 2014-06-21

QML Basic Types

QML has a set of primitive types, as listed below, that are used throughout the QML Elements.

action

The action type has all the properties of QAction.

bool

A boolean is a binary true/false value.

color

A color is a standard color name in quotes.

date

A date is specified as "YYYY-MM-DD".

double

A double number has a decimal point and is stored in double precision.

enumeration

An enumeration type consists of a set of named values.

font

A font type has the properties of a QFont.

int

An integer is a whole number, e.g. 0, 10, or -20.

list

A list of objects.

point

A point type has x and y attributes.

real

A real number has a decimal point, e.g. 1.2 or -29.8.

rect

A rect type has x, y, width and height attributes.

size

A size type has width and height attributes

string

A string is a free form text in quotes, e.g. "Hello world!".

time

A time is specified as "hh:mm:ss".

url

A URL is a resource locator, like a file name.

variant

A variant type is a generic property type.

vector3d

A vector3d type has x, y, and z attributes.

To create additional types, such as data types created in C++, read the Extending QML Functionalities using C++ article.

QML Basic Elements Property Binding

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多