Qt Quick QML 数据类型简介(QtQuick 2.3)

本文介绍了Qt Quick QML中的各种数据类型,包括基本类型、对象类型、视觉类型、用户输入、布局器、动画和图形效果等。重点讨论了如Item、Rectangle、Text、MouseArea、anchors布局、Transition动画等,并提到了QtQuick.LocalStorage 2和QtQuick.Particles 2等模块。
摘要由CSDN通过智能技术生成

通过运行Qt自带的例子,感觉界面确实漂亮,且开发方便,界面与业务分离,模型太爽了,还支持各个平台,而且允许速度也块,综上几种有点,目前还真没有一款C++开发环境能与其媲美。然而这QML很多类型,属性都不熟悉,无从下手,所以想系统的学习下,目前对部分内容做注释,后面学到了再更新。

Qt Quick包括几个其他类型的子模块。


XML List Model 	(XML列表模型) 	- 	包含用于创建XML数据模型的类型
Local Storage 	(本地存储子模型) 	-  	包含用于SQLite数据库接口
Particles 	(颗粒模型) 	- 	提供了一个粒子系统
Window  	(窗体模型)  	-  	包含用于创建顶级窗口和屏幕信息
Dialogs  	(对话框模型) 	-  	包含用于创建系统对话框交互
Controls  	(控件模型) 	-  	提供可重用的UI组件
Layouts  	(布局模型) 	-  	包含用于安排在用户接口

Quick的基本类型

除了QML语言自带的数据类型外 Qt Quick 还有自己的数据类型

date

a date value.

point

a value with x and y attributes.

rect

a value with x, y, width and height attributes.

size

a value with width and height attributes

color

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

font

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

vector2d

A vector2d type has x and y attributes.

vector3d

a value with x, y, and z attributes.

vector4d

A vector4d type has x, y, z and w attributes.(四维)

quaternion

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

matrix4x4

A matrix4x4 type is a 4-row and 4-column matrix (4*4的矩阵)




对象类型

对象类型 都是和Qobject对应的

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值