Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
6.5.3, 6.8.1, 6.9.0
-
None
-
-
2025wk08s1QtforAndroid, 2025wk12s1QtforAndroid
Description
Hi all,
another thing I noticed while porting my app from Qt5 to Qt6 is that it's not really possible to have Qt app as android home launcher anymore
Attached simplest example:
Steps to reproduce:
- create a new QtQuick application using QtCreator
- copy Android templates to android directory, most notably AndroidManifest.xml
- add relevant properties to CMakeList.txt as QtCreator has bug so it doesn't do it automatically
- modify AndroidManifest.xml so that app can be used as launcher by replacing category.LAUNCHER with:
<category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.HOME"/>
- run the app using QtCreator
- app runs as expected (screenshot attached)
- set app as home launcher by pressing Home button and selecting activity (once or always it's the same for this case) or by setting it as Home launcher in Settings
- app runs but it breaks with showing just blank screen - screenshot attached
On Qt5, Native Android or Flutter equivalent AndroidManifest.xml works as expected.
The "fix" for Qt6 is to change android:exported to "false" for main activity in AndroidManifest.xml which prevents it from being launched by another activity (QtCreator as well) but it works when set as home launcher. Not sure what else that breaks but from my perspective it seems as if there are two activities if that makes sense.