How to add qt resources to android APK file?

。_饼干妹妹 提交于 2020-01-24 21:42:13

问题


I'm porting a small Qt application to the Android. I am using Qt Creator.

I have a resource file with some images. The question is how to add these files to the android APK package.
Another question is how to access them from Qt?
Can I use something like:

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


回答1:


You'll need to add the images to your assets folder, and then access them using the following URI:

file:///android_asset/check.png 


来源:https://stackoverflow.com/questions/11071161/how-to-add-qt-resources-to-android-apk-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!