QT_HARMONYOS_APP_ICON
HarmonyOS 应用程序的图标。
该属性自 Qt 6.12 起引入。
注意:该 属性目前处于技术预览阶段,未来版本中可能会发生变更。
注意: 仅当目标平台为 HarmonyOS 时,才会使用此 属性。
指定应用程序图标。该值必须是图像文件的路径,或是$media:<name> 资源引用。相对路径将以目标的源目录为基准进行解析。当提供文件路径时,图像将被复制到包的媒体资源中,并为其生成$media: 引用。在构建HAP包时,图标将被写入AppScope/app.json5 。
如果未设置此属性,则保留包模板中定义的值。
set_target_properties(myapp PROPERTIES
QT_HARMONYOS_APP_ICON "${CMAKE_CURRENT_SOURCE_DIR}/icon.png"
)© 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.