如何添加QT资源到Android APK文件? [英] How to add qt resources to android APK file?
本文介绍了如何添加QT资源到Android APK文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我移植小的Qt
应用到的Android
。我使用的 Qt Creator的
我有一些图像资源文件。现在的问题是如何将这些文件添加到Android的 APK包的。结果
另一个问题是如何从的Qt
?结果他们访问
我可以使用类似:
QIcon则actions_ok = QIcon则(RES_PATH +check.png)?
块引用>解决方案您需要将图像添加到您的
资产
文件夹,然后访问它们使用以下URI:文件:///android_asset/check.png
I'm porting a small
Qt
application to theAndroid
. 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 fromQt
?
Can I use something like:QIcon actions_ok = QIcon(RES_PATH + "check.png")?
解决方案You'll need to add the images to your
assets
folder, and then access them using the following URI:file:///android_asset/check.png
这篇关于如何添加QT资源到Android APK文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文