이 페이지에서

QT_ADD_ANDROID_PERMISSION

대상 실행 파일에 안드로이드 권한을 추가합니다.

이 명령은 Qt6 패키지의 Core 컴포넌트에 정의되어 있으며, 다음과 같이 로드할 수 있습니다:

find_package(Qt6 REQUIRED COMPONENTS Core)

이 명령은 Qt 6.9에 도입되었습니다.

참고: 이 API를 사용할 때는 AndroidManifest.xml에 <!-- %%INSERT_PERMISSIONS --> 태그가 있어야 합니다. 이 태그의 사용에 대한 자세한 내용은 Qt 권한 및 기능을 참조하십시오.

개요

qt_add_android_permission(target NAME <permission-name> [ATTRIBUTES <name1> <value1> ...])

버전 없는 명령이 비활성화되어 있으면 qt6_add_android_permission() 대신 사용하세요. 이 명령과 동일한 인수 집합을 지원합니다.

설명

이 명령은 target 실행 파일에 Android 권한을 추가합니다. 이 명령은 추가 권한을 정의하거나 Qt 모듈에서 설정한 기본 권한을 재정의하는 데 사용할 수 있습니다.

안드로이드 권한 정의에 대한 자세한 내용은 Qt 권한 및 기능을 참조하십시오.

예제

qt_add_executable(myapp
    // ...
)
qt_add_android_permission(myapp
    NAME android.permission.BLUETOOTH_SCAN
    ATTRIBUTES
        minSdkVersion 31
        usesPermissionFlags neverForLocation
)
qt_add_android_permission(myapp
    NAME android.permission.ACCESS_COARSE_LOCATION
)

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