本页内容

QCameraPermission Class

打开相机拍摄照片或视频。更多...

标题: #include <QPermissions>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
自: Qt 6.5

详细说明

要求

若要在运行时请求此权限,必须在构建时进行以下特定于平台的使用声明:

平台类型
Apple用法说明NSCameraUsageDescription
Androiduses-permissionandroid.permission.CAMERA

有关如何将它们添加到您的项目中,请参阅各个使用声明类型。

另请参阅 QPermission 、QCoreApplication::requestPermission()、QCoreApplication::checkPermission() 以及应用程序权限。

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