Qml數據類型

整體上,qml的數據類型分爲基本數據類型和對象類型,基本類型用於表示簡單的值,其中一部分由qml語言提供,另外一部分來自qml模塊。javascript

qml對象類型指類的實例,又分爲qml對象類型和javascript對象,qml引擎支持幾乎全部的javascript標準對象html

1、基本數據類型

1.1 qml提供的基本數據類型

booljava

Binary true/false valueide

doubleurl

Number with a decimal point, stored in double precisionspa

enumeration.net

Named enumeration valuescala

int3d

Whole number, e.g. 0, 10, or -20component

list

List of QML objects

real

Number with a decimal point

string

Free form text string

url

Resource locator

var

Generic property type

 

1.2 qml模塊提供的基本類型

date

Date value

point

Value with x and y attributes

rect

Value with x, y, width and height attributes

size

Value with width and height attributes

color

ARGB color value. The type refers to an ARGB color value. It can be specified in a number of ways:

font

Font value with the properties of QFont. The type refers to a font value with the properties of QFont

matrix4x4

A matrix4x4 type is a 4-row and 4-column matrix

quaternion

A quaternion type has scalar, x, y, and z attributes

vector2d

A vector2d type has x and y attributes

vector3d

Value with x, y, and z attributes

vector4d

A vector4d type has x, y, z and w attributes

 

2、對象類型

2.1 qml對象類型

Date

Provides date functions

Number

Object provides represents a number value

String

Object represents a string value

Component

Encapsulates a QML component definition

Qt

Provides a global object with useful enums and functions from Qt

QtObject

A basic QML type

Locale

Provides locale specific properties and formatted data

Binding

Enables the arbitrary creation of property bindings

Connections

Describes generalized connections to signals

Instantiator

Dynamically creates objects

Timer

Triggers a handler at a specified interval

 

2.2 javascript對象

http://blog.csdn.net/dalancon/article/details/7934688

相關文章
相關標籤/搜索