QML 元素
These are the functionally grouped lists of QML elements as part of
Qt Quick
.
Elements are declared with the their name and two curly braces. Elements may be nested in elements, thereby creating a parent-child relationship between the two elements.
To see the QML elements listed by functional area, see the
Groups Of Related QML Elements
页面。
基本 QML 元素
-
Item
- Basic item element inherited by QML elements
-
Component
- Encapsulates QML elements during importing
-
QtObject
- Basic element containing only the
objectName
property
图形
文本处理
鼠标和交互区域
-
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 "flicked"
-
Flipable
- Provides a surface that produces "flipping" effects
-
PinchArea
- Enables simple pinch gesture handling
定位器和中继器
-
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
-
Scale
- Assigns item scaling behaviors
-
Rotation
- Assigns item rotation behaviors
-
Translate
- Assigns item translation behaviors
状态
动画和过渡
Elements that animate properties based on data types
模型和数据处理
视图
-
ListView
- Provides a list visualization of a model
-
GridView
- Provides a grid visualization of a model
-
PathView
- Visualizes a model's contents along a path. See
路径元素
了解更多信息。
路径定义
实用工具
-
Connections
- Explicitly connects signals and signal handlers
-
Timer
- Provides timed triggers
-
Qt
- The QML global Qt object provides useful enums and functions from Qt.
-
WorkerScript
- Enables the use of threads in QML
-
Loader
- Controls the loading of items or components
-
LayoutItem
- Allows declarative UI elements inside Qt's Graphics View layouts
-
LayoutMirroring
- Used to mirror layout behavior
图形效果
附加元素
These elements are not included in the
QtQuick 1.0
module. Their respective QML bindings should first be obtained and installed.