QT_HARMONYOS_TARGET_SDK_VERSION

HarmonyOS 应用程序的目标 SDK 版本。

该属性自 Qt 6.12 起引入。

注意:该 属性目前处于技术预览阶段,未来版本中可能会发生变化。

注意:此 属性仅在针对 HarmonyOS 平台时使用。

指定在构建 HAP 包时写入 `entry/build-profile.json5 ` 的目标 SDK 版本字段。该值将原样替换,因此必须使用 HarmonyOS 工具链要求的格式,例如14 。

如果未设置此属性,则保留包模板中定义的值。

set_target_properties(myapp PROPERTIES
    QT_HARMONYOS_TARGET_SDK_VERSION "14"
)

另请参阅 QT_HARMONYOS_COMPATIBLE_SDK_VERSION和QT_HARMONYOS_COMPILE_SDK_VERSION。

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