QSGBasicGeometryNode Class
QSGBasicGeometryNode 类是基于几何的节点的基类。更多内容...
| 头文件: | #include <QSGBasicGeometryNode> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Quick) target_link_libraries(mytarget PRIVATE Qt6::Quick) |
| qmake: | QT += quick |
| 继承自: | QSGNode |
| 继承自: |
公共函数
| virtual | ~QSGBasicGeometryNode() override |
| QSGGeometry * | geometry() |
| const QSGGeometry * | geometry() const |
| void | setGeometry(QSGGeometry *geometry) |
详细说明
不应单独使用 QSGBasicGeometryNode 类。它仅封装了QSGGeometryNode 和QSGClipNode 类之间的共享功能。
注意:所有 以 QSG 为前缀的类应仅在场景图的渲染线程上使用。有关详细信息,请参阅“场景图与渲染”。
成员函数文档
[override virtual noexcept] QSGBasicGeometryNode::~QSGBasicGeometryNode()
删除此QSGBasicGeometryNode 。
如果该节点设置了QSGNode::OwnsGeometry 标志,则还会删除它所指向的几何体对象。该标志默认未设置。
QSGGeometry *QSGBasicGeometryNode::geometry()
返回该节点的几何体。
默认情况下,几何体为空。
另请参阅 setGeometry()。
const QSGGeometry *QSGBasicGeometryNode::geometry() const
返回该节点的几何体。
默认情况下,几何体为空。
void QSGBasicGeometryNode::setGeometry(QSGGeometry *geometry)
将该节点的几何体设置为geometry 。
如果该节点的QSGNode::OwnsGeometry 标志已设置,它还将删除其所引用的几何体对象。默认情况下,此标志未被设置。
如果在未再次调用 setGeometry() 的情况下更改了几何体,用户还必须使用QSGNode::markDirty() 将该几何体标记为“已修改”。
© 2026 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.