Qt Quick Ultralite QML 类型

The Qt Quick Ultralite module provides graphical primitive types. These types are only available in a QML document if that document imports the QtQuick 名称空间。

To use the QtQuick QML types, link your application to the Qul::QuickUltralite CMake target:

target_link_libraries(app Qul::QuickUltralite Qul::QuickUltralitePlatform)
							

And add the following import statement to your .qml 文件:

import QtQuick 2.15
							

For information about QML applications in general, see the Qt documentation on QML 应用程序 QML 参考 .

Since version 1.3, the QtQuick module offered by Qt Quick Ultralite is source-compatible with Qt's QtQuick module.

子模块

Qt Quick Ultralite has submodules that offer additional types.

  • Controls - 提供一组可重用 UI 组件
  • Charts - provides components for creating charts

基本类型

There are a number of basic types that are supported by default in the QML language .

此外, QtQuick import provides the following basic types:

color

ARGB color value

Other basic types

In later Qt Quick Ultralite releases, the QML basic types are planned to be supported as follows:

A QML basic type 支持状态
var Currently supported only in script expressions.
list 不支持
url 不支持

对象类型

AnchorChanges

指定如何按状态改变项锚点

动画

所有 QML 动画的基

行为

Defines a default animation for a property change

BorderImage

基于图像描绘边框

ColorAnimation

Animates changes in color values

Column

Positions its children in a column

组件

封装 QML 组件定义

Connections

Enables connecting a QML signal to a handler

Flickable

Provides a surface that can be "flicked"

图像

显示图像

Item

A basic visual QML type

KeyEvent

Provides information about a key event

Provides key handling to Items

ListElement

定义 ListModel 数据项

ListModel

定义自由形式列表数据源

ListView

Provides a list view of items provided by a model

Matrix4x4

Provides a 4x4 matrix to transform an Item

MouseArea

Enables simple touch handling

MouseEvent

Provides information about a touch event

NumberAnimation

Animates changes in qreal-type values

ParallelAnimation

Enables animations to be run in parallel

PauseAnimation

Provides a pause for an animation

PropertyAnimation

Animates changes in property values

PropertyChanges

描述状态的新特性绑定或值

Qt

提供带有有用 Qt 枚举和函数的全局对象

QtObject

基本 QML 类型

QulPerf

Holds information about application performance

Rectangle

Paints a filled rectangle with optionally rounded corners

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

Row

Positions its children in a row

Scale

Provides a way to scale an item

ScriptAction

Defines scripts to be run during an animation

SequentialAnimation

Allows animations to be run sequentially

State

定义对象和特性的配置

Text

Specifies how to add text to a scene

Timer

按指定间隔触发处理程序

Transform

For specifying advanced transformations on Image, Text, and StaticText

Transition

Defines animated transitions that occur on state changes

Translate

Provides a way to move an item without changing its x or y properties