I'm following this howto to build an Android application with Python3 and Qt5. Nearly everything works fine but somehow I cannot find out how to set the application icon. In the documentation I could not find anything neither..
And just in case you know PyQtDeploy anyway.. how do I set the build mode from debug
to release
?
Backround:
pyqtdeploy-build
creates the whole build-folder for Android (which contains all resources and AndroidManifest.xml
) from scratch. Up to now I did not find a way to tell which icon to use. I would expect an option in the pyqtdeploy interface but there seems to be none..
Edit
I have never tried it but @Fred in comment above mentioned this way in Qt Creator - maybe it will work
Edit end
PyQtDeploy is designed for Python code and resources management. App icon is an Android framework thing, so you have to do it Android way - create resource in
res
folder and reference it inAndroid manifest
.You can automate the process though - you may create simple bash script that does the thing or one more Python build script with the same purpose - it takes icon from your location moves it to
res
folder and alters previously generated manifest with the correct reference in form ofandroid:icon="@drawable/your_logo_name"
.At least I was doing it like that.
And as a recommendation - if you want to use Python to develop under Android(and cross platform) use Kivy it is much more mature, supportable and complete with much bigger community. It is much faster and has more libs also.
Hope it helps.