I made a very simple Qt Quick Application (all using QML) and want it to appear as full screen/immersive mode on android. How can I achieve that?
-
2In Android, Qml apps already start full screen, can you describe yourself in more detail. – Mohammad Kanan Mar 20 '18 at 16:33
2 Answers
You can achieve it with QML in ApplicationWindow:
ApplicationWindow {
//...
visibility: Window.FullScreen
}

- 618
- 8
- 14
Android creates an "activity" instance (android "view") before your/any Qt code runs. This view/activity decides whether the "title bar" of android is shown or not, so you will need to modify the parameters with which this view/window is created. I believe this can't be done at runtime of your app (you could make two activities and switch between them though).
Your Qt-project needs an AndroidManifest.xml to be deployed with your compiled code. If you didn't add one yourself then the default one gets pulled during deployment, but you can override it with your own file. The parameters needed to go fullscreen can be set in this file. See About the Full Screen And No Titlebar from manifest for details.

- 805
- 5
- 8