Qt_qml学习笔记

Qt Quick是一个用于帮助开发者设计直观,现代,流畅的用户界面的技术集,近年来被广泛应用于手机,媒体播放器,机顶盒和其他手提设备.Qt Quick中包含了大量的用户界面元素,及描述这些用户界面的陈述性(declarative)语言,和一个语言运行时.在典型的Qt应用程序中有一系列C++ API与这些高层次特性整合.Qt Creator2.1的整合开发环境(IDE)包含了开发Qt Quick应用程序的必要工具.

声明元素时要带有名称和两个花括号.元素可能被嵌入到其他元素中,从而在两个元素间创建了父子关系. 基本QML元素

?

Item -被其他QML元素继承的基本项 Basic item element inherited by QML elements

? Component - 导入时封装了QML元素Encapsulates QML elements during importing

? QtObject - 仅容纳一个objectName属性的基本元素Basic element containing only the objectName property

图形

? ? ? ?

Rectangle - 一个矩形元素A rectangle element

Image -屏幕上的一个位图 For incorporating bitmaps into a scene BorderImage - 可使用图片作为边缘 Allows the use of images as borders AnimatedImage - 未播放动画而存储的一系列帧 For playing animations stored in a series of frames

? ?

Gradient - 定义颜色渐变 For defining a color gradient

GradientStop - 为Gradient定义一个颜色 Used to define a color within a Gradient

? SystemPalette - 提供访问Qt调色板的接口 Provides access to the Qt palettes

文字处理

? ? ?

Text - 向屏幕上插入格式化的文字 For inserting formatted text into a scene TextInput - 获取用户键盘输入 Captures user key input

TextEdit - 显示多行可编辑的格式化文本 Displays multiple lines of editable formatted text

? IntValidator - 验证整数Validates values as integers

? ?

DoubleValidator - 验证实数 Validates real values

RegExpValidator - 字符串正则表达式验证器 Validator for string regular expressions

? FontLoader - 按名称或URL加载字体 Loads fonts by name or URL

鼠标和交互区域

?

MouseArea - 设置一块用于鼠标交互的区域 Sets up an area for mouse interaction

? Keys - 提供一个带有附加属性的组件用于处理键盘输入Provides components with attached properties to handle key input.

? FocusScope - 传递键盘焦点变化的元素 Element that mediate keyboard focus changes

? Flickable - 提供实现\弹性)效果的表面组件 Provides a surface that can be \

? Flipable - 提供处理”flipping”(翻转)效果的表面组件 Provides a surface that produces \

? PinchArea - 简单的挤压手势处理 Enables simple pinch gesture handling

定位器和重复器(Repeater)

? ? ? ? ?

Column - 垂直排列子元素 Arranges its children vertically Row - 水平排列子元素 Arranges its children horizontally Grid - 在网格中定位子元素 Positions its children in a grid

Flow - 按坐标定位子元素 Positions its children with wrapping support Repeater - 使用一个模型创建多个组件 Uses a model to create multiple components

转换Transformations

? ? ?

Scale - 设置item的缩放行为 Assigns item scaling behaviors Rotation - 设置item的选择行为 Assigns item rotation behaviors Translate - 设置item的移动行为 Assigns item translation behaviors

状态States

?

State - 定义对象和属性的一系列配置值 Defines sets of configurations of objects and properties

? PropertyChanges - 描述在状态中的属性变化 Describes property changes within a state

? StateGroup - 包含一系列的状态和状态变换 Contains a set of states and state transitions

? ?

StateChangeScript - 时脚本绑定到一个状态上 Allows script binding in a state ParentChange - 在状态改变时重定义item的父项 Re-parent an Item in a state change

? AnchorChanges - 在状态中改变item的描点 Change the anchors of an item in a state

动画和过度(Transitions)

? ? ? ?

Transition - 状态改变时动画的过度 Animates transitions during state changes SequentialAnimation - 顺序执行动画 Runs animations sequentially ParallelAnimation - 并行执行动画 Runs animations in parallel

Behavior - 为属性变换指定默认动画 Specifies a default animation for property changes

? PropertyAction - 在动画中设置直接的属性变化 Sets immediate property changes during animation

? ?

PauseAnimation - 暂停动画 Introduces a pause in an animation

SmoothedAnimation - 使属性平滑的到达指定值 Allows a property to smoothly track a value

? SpringAnimation - 使属性向弹簧效果一样达到指定值 Allows a property to track a value in a spring-like motion

? ScriptAction - 动画时执行脚本 Runs scripts during an animation

基于数据类型的元素动画属性 Elements that animate properties based on data types

? ? ?

PropertyAnimation - 基于属性变化的动画 Animates property changes

NumberAnimation - 基于greal类型属性的动画 Animates properties of type qreal Vector3dAnimation - 基于QVector3d类型属性的动画 Animates properties of type QVector3d

? ? ? ?

ColorAnimation - 基于颜色属性的动画 Animates color changes RotationAnimation - 基于旋转的动画 Animates rotations

ParentAnimation - 基于parent属性变化的动画 Animates parent changes AnchorAnimation - 基于描点变化的动画 Animates anchor changes

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4