简体   繁体   中英

Qt: Setting the app-icon on Android and iOS

I'm developing an App that is supposed to run on
Windows, MacOSX, Android, and iOS.

I found out how to set the icon on Windows and Mac, but how does it work on Android and iOS?

Thanks for reading!

EDIT: I do not use Nessecitas SDK. There is no AndroidManifest.xml in my project folder. However, there is a folder in the same directory as my project-folder called "build-myProjectName-Android_f_r_armeabi_GCC_4_8_Qt_5_3_1-Release", which contains a folder "android-build", which contains a manifest.

You should create an Android manifest file and edit it in Qt Creator.

Since Qt 5.4 along with QtCreator 3.3.0, you should go to Projects > Build Android APK > Details

Now Select Create Templates to create the manifest file and to open it in editor :

在此输入图像描述

As shown in the picture, you can set three versions of icons for your application with low, medium, and high DPI values, from left to right.

In previous versions of Qt and Qt Creator you should go to Projects->Run->Deploy and select Create AndroidManifest.xml button.

在你的Android清单中有一行android:icon="@drawable/launcher_icon"在这里设置你的图标名称,就在iOS中你可以使用图像资源轻松拖放图标和启动画面

Creating a new project in eclipse will create a launcher icon with the name ic_launcher(Can be changed) in 4 different sizes as the http://developer.android.com/design/style/iconography.html says 48*48,72*72,96*96 and 144*144 and these icons can be found in mdpi,hdpi,xhdpi and xxhdpi folders respsetively. Change these icons as u required. You can check the manifest.xml file and see android:icon="@drawable/ic_launcher" has been set.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM