qt_android_app_icon

Android 应用程序的图标资源名称。

该属性在 Qt 6.9 中引入。

注意: 该属性仅用于 Android 平台。

将应用程序的图标名称指定为 Android 可绘制图标或 mipmap 引用。这只有在AndroidManifest.xml 文件包含占位符或AndroidManifest.xml 由 Qt 管理时才有效。

<application
    ...
    android:icon="-- %%INSERT_APP_ICON%% --"
    ...
>

使用该属性的方法如下:

set_target_properties(${target} PROPERTIES
    QT_ANDROID_APP_ICON "@mipmap/ic_launcher"
)

或使用可绘制文件:

set_target_properties(${target} PROPERTIES
    QT_ANDROID_APP_ICON "@drawable/ic_launcher"
)

另请参阅 qt_android_generate_deployment_settings()

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