Qt Quick 中的重要概念 - 可视画布
Qt Quick 提供的可视画布是一个具有 Z 排序功能的二维画布。
坐标系
Qt Quick 坐标系中的左上角像素为 [0, 0] 像素。子项目的坐标系是相对于其可视化父项目而言的。有关Qt Quick 使用的坐标系的详细信息,请参阅坐标系文档。
视觉父项
在使用Qt Quick 的 QML 应用程序中,有两种不同的父项。第一种是所有权父级(也称为QObject 父级),它决定对象的生命周期语义。第二种是视觉父级,它决定项目在画布上的绘制位置和某些属性(例如,不透明度适用于视觉子项)。
几乎在所有情况下,视觉父级都与所有权父级相同。有关该主题的更多详细信息,请参阅有关视觉父级的文档。
场景图
现代计算机系统和设备使用图形处理单元或 GPU 来渲染图形。Qt Quick 可以通过使用OpenGL、Vulkan 或Metal 等图形 API 来利用这些图形硬件。在 Qt 6 中,Qt Quick 的默认图形适配支持多种图形 API,如 OpenGL (ES)、Vulkan、Metal 和 Direct 3D 11,可在 Qt XML 中显示使用Qt Quick 开发的应用程序。特别是,Qt Quick 定义了一个场景图,然后进行渲染。有关场景图概念、场景图的益处以及Qt Quick 提供的场景图适配的深入信息,请参阅有关场景图的文档。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.