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

相关文章
相关标签/搜索