简体   繁体   English

Qt:在Android和iOS上设置app-icon

[英]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. Windows,MacOSX,Android和iOS。

I found out how to set the icon on Windows and Mac, but how does it work on Android and iOS? 我发现了如何在Windows和Mac上设置图标,但它如何在Android和iOS上运行?

Thanks for reading! 谢谢阅读!

EDIT: I do not use Nessecitas SDK. 编辑:我不使用Nessecitas SDK。 There is no AndroidManifest.xml in my project folder. 我的项目文件夹中没有AndroidManifest.xml。 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. 但是,我的项目文件夹中有一个名为“build-myProjectName-Android_f_r_armeabi_GCC_4_8_Qt_5_3_1-Release”的文件夹,其中包含一个文件夹“android-build”,其中包含一个清单。

You should create an Android manifest file and edit it in Qt Creator. 您应该创建一个Android清单文件并在Qt Creator中进行编辑。

Since Qt 5.4 along with QtCreator 3.3.0, you should go to Projects > Build Android APK > Details 从Qt 5.4和QtCreator 3.3.0开始,你应该去Projects> Build Android APK> Details

Now Select Create Templates to create the manifest file and to open it in editor : 现在选择Create Templates以创建清单文件并在编辑器中打开它:

在此输入图像描述

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. 如图所示,您可以从左到右为您的应用程序设置三个版本的图标,具有低,中和高DPI值。

In previous versions of Qt and Qt Creator you should go to Projects->Run->Deploy and select Create AndroidManifest.xml button. 在以前版本的Qt和Qt Creator中,您应该转到Projects-> Run-> Deploy并选择Create AndroidManifest.xml按钮。

在你的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. 在eclipse中创建一个新项目将创建一个启动器图标,其名称为ic_launcher(可以更改),有4种不同的大小,如http://developer.android.com/design/style/iconography.html所示 48 * 48,72 * 72,96 * 96和144 * 144这些图标可以在mdpi,hdpi,xhdpi和xxhdpi文件夹中找到。 Change these icons as u required. 根据需要更改这些图标。 You can check the manifest.xml file and see android:icon="@drawable/ic_launcher" has been set. 您可以检查manifest.xml文件并查看android:icon =“@ drawable / ic_launcher”已设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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