简体   繁体   English

如何将qt资源添加到android APK文件?

[英]How to add qt resources to android APK file?

I'm porting a small Qt application to the Android . 我正在将一个小型Qt应用程序移植到Android I am using Qt Creator . 我正在使用Qt Creator

I have a resource file with some images. 我有一个包含一些图像的资源文件。 The question is how to add these files to the android APK package . 问题是如何将这些文件添加到Android APK包
Another question is how to access them from Qt ? 另一个问题是如何从Qt访问它们?
Can I use something like: 我可以使用类似的东西:

QIcon actions_ok = QIcon(RES_PATH + "check.png")? QIcon actions_ok = QIcon(RES_PATH +“check.png”)?

您需要将图像添加到assets文件夹,然后使用以下URI访问它们:

file:///android_asset/check.png 

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

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