The
Qt Quick
模块提供图形图元类型。这些类型仅在 QML 文档中可用,若该文档导入
QtQuick
名称空间。
要使用模块,import
QtQuick
模块采用以下语句:
import QtQuick
拜访
Qt Quick
module documentation for more information about the concepts that are central to
QtQuick
.
Qt Quick includes several submodules that contain additional types:
There are a number of value types that are 由 QML 语言默认支持 .
此外,
QtQuick
import provides the following value types:
color | ARGB color value |
font | Font value with the properties of QFont. The font type refers to a font value with the properties of QFont |
matrix4x4 | A matrix4x4 type is a 4-row and 4-column matrix |
point | 具有 X 和 Y 属性的值 |
quaternion | A quaternion type has scalar, x, y, and z attributes |
rect | 具有 X、Y、宽度及高度属性的值 |
size | 具有宽度和高度属性的值 |
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 |
大多数对象类型的提供是通过
QtQuick
import 基于
Item
类型,其自身派生自
QtObject
.
QML 对象类型
提供通过 Qt QML 模块 (譬如
QtObject
and
Component
) 也是可用的当 import
QtQuick
.
Accessible | 启用 QML 项的可访问性 |
AnchorAnimation | Animates changes in anchor values |
AnchorChanges | 指定如何按状态改变项锚点 |
AnimatedImage | Plays animations stored as a series of images |
AnimatedSprite | 绘制子画面动画 |
Animation | 所有 QML 动画的基 |
AnimationController | 启用动画的手动控制 |
Animator | Is the base of all QML animators |
应用程序 | Provides access to global application state properties shared by many QML components |
Behavior | Defines a default animation for a property change |
BorderImage | 基于图像描绘边框 |
BorderImageMesh | Defines a mesh with vertices arranged like those of a BorderImage |
Canvas | Provides a 2D canvas item enabling drawing via JavaScript |
CanvasGradient | Provides an opaque CanvasGradient interface |
CanvasImageData | Contains image pixel data in RGBA order |
CanvasPixelArray | Provides ordered and indexed access to the components of each pixel in image data |
CloseEvent | Notification that a Window is about to be closed |
ColorAnimation | Animates changes in color values |
ColorGroup | Set of colors by roles |
Column | Positions its children in a column |
Context2D | Provides 2D context for shapes on a Canvas item |
DoubleValidator | Defines a validator for non-integer numbers |
Drag | For specifying drag and drop events for moved Items |
DragEvent | Provides information about a drag event |
DragHandler | Handler for dragging |
DropArea | For specifying drag and drop handling in an area |
EnterKey | Provides a property to manipulate the appearance of Enter key on an on-screen keyboard |
Flickable | 提供可以 "轻弹" 的表面 |
Flipable | Provides a surface that can be flipped |
Flow | Positions its children side by side, wrapping as necessary |
FocusScope | Explicitly creates a focus scope |
FontLoader | Allows fonts to be loaded by URL |
FontMetrics | Provides metrics for a given font |
FrameAnimation | Triggers a handler at every animation frame update |
GestureEvent | Parameter given with the gestureStarted signal |
Gradient | Defines a gradient fill |
GradientStop | Defines the color at a position in a Gradient |
GraphicsInfo | Provides information about the scenegraph backend and the graphics API used by Qt Quick |
Grid | Positions its children in grid formation |
GridMesh | Defines a mesh with vertices arranged in a grid |
GridView | For specifying a grid view of items provided by a model |
HoverHandler | Handler for mouse and tablet hover |
Image | 显示图像 |
InputMethod | Provides access to QInputMethod for QML applications |
IntValidator | Defines a validator for integer values |
Item | A basic visual QML type |
ItemGrabResult | Contains the results from a call to Item::grabToImage() |
KeyEvent | Provides information about a key event |
KeyNavigation | Supports key navigation by arrow keys |
Keys | Provides key handling to Items |
LayoutMirroring | Property used to mirror layout behavior |
ListView | Provides a list view of items provided by a model |
Loader | Allows dynamic loading of a subtree from a URL or Component |
Matrix4x4 | Provides a way to apply a 4x4 tranformation matrix to an Item |
MouseArea | Enables simple mouse handling |
MouseEvent | Provides information about a mouse event |
MultiPointHandler | Abstract handler for multi-point Pointer Events |
MultiPointTouchArea | 启用处理多触摸点 |
NumberAnimation | Animates changes in qreal-type values |
OpacityAnimator | Type animates the opacity of an Item |
Palette | Contains color groups for each QML item state |
ParallelAnimation | Enables animations to be run in parallel |
ParentAnimation | Animates changes in parent values |
ParentChange | 指定如何在状态改变时重设项父级 |
路径 | Defines a path for use by PathView and Shape |
PathAngleArc | Defines an arc with the given radii and center |
PathAnimation | Animates an item along a path |
PathArc | Defines an arc with the given radius |
PathAttribute | Specifies how to set an attribute at a given position in a Path |
PathCubic | Defines a cubic Bezier curve with two control points |
PathCurve | Defines a point on a Catmull-Rom curve |
PathElement | 基路径类型 |
PathInterpolator | Specifies how to manually animate along a path |
PathLine | Defines a straight line |
PathMove | 移动路径的位置 |
PathMultiline | Defines a set of polylines through a list of lists of coordinates |
PathPercent | Manipulates the way a path is interpreted |
PathPolyline | Defines a polyline through a list of coordinates |
PathQuad | Defines a quadratic Bezier curve with a control point |
PathSvg | Defines a path using an SVG path data string |
PathText | Defines a string in a specified font |
PathView | Lays out model-provided items on a path |
PauseAnimation | Provides a pause for an animation |
PinchArea | 启用简单捏合手势处理 |
PinchEvent | For specifying information about a pinch event |
PinchHandler | Handler for pinch gestures |
PointHandler | Handler for reacting to a single touchpoint |
PointerDevice | QML equivalent for QPointingDevice |
PointerDeviceHandler | Abstract handler for pointer events with device-specific constraints |
PointerEvent | QML equivalent for QPointerEvent |
PointerHandler | Abstract handler for pointer events |
Positioner | Provides attached properties that contain details on where an item exists in a positioner |
PropertyAction | Specifies immediate property changes during animation |
PropertyAnimation | Animates changes in property values |
PropertyChanges | 描述状态的新特性绑定或值 |
Rectangle | Paints a filled rectangle with an optional border |
RegularExpressionValidator | Provides a string validator |
Repeater | Instantiates a number of Item-based components using a provided model |
Rotation | Provides a way to rotate an Item |
RotationAnimation | Animates changes in rotation values |
RotationAnimator | Type animates the rotation of an Item |
Row | Positions its children in a row |
Scale | Provides a way to scale an Item |
ScaleAnimator | Type animates the scale factor of an Item |
Screen | Attached object provides information about the Screen an Item or Window is displayed on |
ScriptAction | Defines scripts to be run during an animation |
SequentialAnimation | Allows animations to be run sequentially |
ShaderEffect | Applies custom shaders to a rectangle |
ShaderEffectSource | Renders a Qt Quick item into a texture and displays it |
Shortcut | 提供键盘快捷键 |
SinglePointHandler | Abstract handler for single-point Pointer Events |
SmoothedAnimation | Allows a property to smoothly track a value |
SpringAnimation | Allows a property to track a value in a spring-like motion |
Sprite | Specifies sprite animations |
SpriteSequence | 绘制子画面动画 |
State | 定义对象和特性的配置 |
StateChangeScript | 指定如何按状态运行脚本 |
StateGroup | 为非项类型提供内置状态支持 |
SystemPalette | Provides access to the Qt palettes |
TableView | Provides a table view of items to display data from a model |
TapHandler | Handler for taps and clicks |
Text | Specifies how to add formatted text to a scene |
TextEdit | Displays multiple lines of editable formatted text |
TextInput | Displays an editable line of text |
TextMetrics | Provides metrics for a given font and text |
TouchPoint | Describes a touch point in a MultiPointTouchArea |
Transform | For specifying advanced transformations on Items |
Transition | Defines animated transitions that occur on state changes |
Translate | Provides a way to move an Item without changing its x or y properties |
TreeView | Provides a tree view to display data from a QAbstractItemModel |
UniformAnimator | Type animates a uniform of a ShaderEffect |
Vector3dAnimation | Animates changes in QVector3d values |
ViewTransition | Specifies items under transition in a view |
WheelEvent | Provides information about a mouse wheel event |
WheelHandler | 用于鼠标滚轮的处理程序 |
Window | 创建新的顶层窗口 |
XAnimator | Type animates the x position of an Item |
YAnimator | Type animates the y position of an Item |
eventPoint | Qml equivalent for QEventPoint |
handlerPoint | An event point |
pointingDeviceUniqueId | QML equivalent for QPointingDeviceUniqueId |