PySide6.QtQuick¶
- PySide6.QtQuick.QQuickAsyncImageProvider
- PySide6.QtQuick.QQuickFramebufferObject
- PySide6.QtQuick.QQuickGraphicsConfiguration
- PySide6.QtQuick.QQuickGraphicsDevice
- PySide6.QtQuick.QQuickImageProvider
- PySide6.QtQuick.QQuickImageResponse
- PySide6.QtQuick.QQuickItem
- PySide6.QtQuick.QQuickItemGrabResult
- PySide6.QtQuick.QQuickPaintedItem
- PySide6.QtQuick.QQuickRenderControl
- PySide6.QtQuick.QQuickRenderTarget
- PySide6.QtQuick.QQuickRhiItem
- PySide6.QtQuick.QQuickRhiItemRenderer
- PySide6.QtQuick.QQuickTextDocument
- PySide6.QtQuick.QQuickTextureFactory
- PySide6.QtQuick.QQuickTransform
- PySide6.QtQuick.QQuickView
- PySide6.QtQuick.QQuickWindow
- PySide6.QtQuick.QSGBasicGeometryNode
- PySide6.QtQuick.QSGClipNode
- PySide6.QtQuick.QSGDynamicTexture
- PySide6.QtQuick.QSGFlatColorMaterial
- PySide6.QtQuick.QSGGeometry
- PySide6.QtQuick.QSGGeometryNode
- PySide6.QtQuick.QSGImageNode
- PySide6.QtQuick.QSGMaterial
- PySide6.QtQuick.QSGMaterialShader
- PySide6.QtQuick.QSGMaterialType
- PySide6.QtQuick.QSGNinePatchNode
- PySide6.QtQuick.QSGNode
- PySide6.QtQuick.QSGNodeVisitor
- PySide6.QtQuick.QSGOpacityNode
- PySide6.QtQuick.QSGOpaqueTextureMaterial
- PySide6.QtQuick.QSGRectangleNode
- PySide6.QtQuick.QSGRenderNode
- PySide6.QtQuick.QSGRendererInterface
- PySide6.QtQuick.QSGRootNode
- PySide6.QtQuick.QSGSimpleRectNode
- PySide6.QtQuick.QSGSimpleTextureNode
- PySide6.QtQuick.QSGTextNode
- PySide6.QtQuick.QSGTexture
- PySide6.QtQuick.QSGTextureMaterial
- PySide6.QtQuick.QSGTextureProvider
- PySide6.QtQuick.QSGTransformNode
- PySide6.QtQuick.QSGVertexColorMaterial
详细描述¶
Qt Quick 模块实现了 QML 的“标准库”
Qt Quick 模块是用于编写 QML 应用程序的标准库。虽然 Qt Qml 模块提供了 QML 引擎和语言基础设施,但 Qt Quick 模块提供了使用 QML 创建用户界面所需的所有基本类型。它提供了一个可视画布,并包括用于创建和动画化视觉组件、接收用户输入、创建数据模型和视图以及延迟对象实例化的类型。
Qt Quick 模块提供了 QML API,它提供了用于使用 QML 语言创建用户界面的 QML 类型,以及 C++ API,用于使用 C++ 代码扩展 QML 应用程序。
注意
一组基于Qt Quick的UI控件也可用于创建用户界面。有关更多信息,请参阅Qt Quick Controls。
如果您是QML和Qt Quick的新手,请参阅QML应用程序以了解如何编写QML应用程序。
使用模块¶
QML API¶
模块的QML类型可通过QtQuick
导入使用。要使用这些类型,请将以下导入语句添加到您的.qml文件中:
C++ API¶
使用Qt模块的C++ API需要链接到模块库,无论是直接链接还是通过其他依赖项。一些构建工具对此有专门的支持,包括CMake和qmake。
使用CMake构建¶
使用 find_package()
命令在 Qt6
包中定位所需的模块组件:
find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick)
有关更多详细信息,请参阅使用CMake构建概述。
使用qmake构建¶
要配置模块以使用qmake进行构建,请将模块作为QT
变量的值添加到项目的.pro文件中:
QT += quick
Qt Quick中的重要概念¶
Qt Quick 提供了创建具有流畅和动态用户界面的丰富应用程序所需的一切。它使您能够围绕用户界面组件的行为以及它们如何相互连接来构建用户界面,并提供了一个具有自己的坐标系和渲染引擎的可视画布。动画和过渡效果是 Qt Quick 中的一等概念,您可以通过专门的组件添加粒子和着色器效果的视觉效果。
使用Qt Quick模块时,您需要了解如何使用QML语言编写QML应用程序。特别是QML应用程序页面中的QML基础和QML要点。
要了解更多关于使用QML语言的信息,请参阅Qt Qml模块文档。
C++ 扩展点¶
文章和指南¶
编写 QML 应用程序的更多信息:
QML 应用程序 - 使用 QML 和 Qt Quick 进行应用程序开发的基本信息
Qt Qml - Qt QML 模块的文档,该模块提供了 QML 引擎和语言基础设施
Qt Quick 操作指南 - 展示如何在 Qt Quick 中完成特定任务
示例¶
参考¶
Qt Quick C++ Classes - Qt Quick 模块提供的 C++ API
Qt Quick QML Types -
QtQuick
导入提供的 QML 类型列表
Effects - 提供应用于 Qt Quick 项目的图形效果
Local Storage - 包含用于 SQLite 数据库的 JavaScript 接口的子模块
Particles - 提供 Qt Quick 的粒子系统
Layouts - 提供用于排列 Qt Quick 项目的布局
Tests - 包含用于为 QML 应用程序编写单元测试的类型
Shapes - 提供用于在 Qt Quick 场景中渲染矢量形状的类型
Vector Image - 提供用于显示矢量图像文件的类型
Qt Quick Android 类 - 提供用于将 QML 与 Java/Kotlin Android API 结合使用的类。
Qt学院课程¶
许可证和归属¶
Qt Quick 可从 The Qt Company 获得商业许可。此外,它也可以在自由软件许可下使用。自 Qt 5.4 起,这些自由软件许可包括 GNU 宽通用公共许可证,版本 3,或 GNU 通用公共许可证,版本 2。有关更多详情,请参阅 Qt 许可。
该模块还提供了QML类型。
班级列表¶
A |
|||||
C |
|||||
G |
|||||
P |
|||||
Q |
|||||
R |
|||||
S |
|||||
T |
|||||
U |