本页内容

Qt3DRender::QCameraSelector Class

class Qt3DRender::QCameraSelector

用于选择要使用的摄像头的类。更多...

头文件: #include <qcameraselector.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
在 QML 中: CameraSelector
继承自: Qt3DRender::QFrameGraphNode
状态: 已弃用

该类已弃用。我们强烈建议不要在新代码中使用它。

属性

公共函数

QCameraSelector(Qt3DCore::QNode *parent = nullptr)
Qt3DCore::QEntity *camera() const

公共槽位

void setCamera(Qt3DCore::QEntity *camera)

信号

void cameraChanged(Qt3DCore::QEntity *camera)

详细说明

Qt3DRender::QCameraSelector 可用于选择相机,FrameGraph 在绘制实体时会使用该相机。

属性文档

camera : Qt3DCore::QEntity*

保存当前选定的摄像机。

访问函数:

Qt3DCore::QEntity *camera() const
void setCamera(Qt3DCore::QEntity *camera)

通知信号:

void cameraChanged(Qt3DCore::QEntity *camera)

成员函数文档

[explicit] QCameraSelector::QCameraSelector(Qt3DCore::QNode *parent = nullptr)

该构造函数会根据指定的parent 创建一个实例。

© 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.