Important: Please read the Qt Code of Conduct -

[SOLVED] Android app screen rotation not working.

  • I have an Android app which I've been trying to get working under Qt 5.2.1. All went well when I ran it on the emulator, so I loaded it onto an actual phone to test it there.

    The problem I've encountered is that if I rotate the phone, the QML screen I have built disappears, and a program title bar appears with my application icon and name on it. From that point on, no matter what I do, all I have is a blank screen with a title bar on it.

    If I create a new "Hello World" application and deploy it to Android, it doesn't do this, so there must be something different about my project which is causing this graphics problem. There doesn't seem to be any way to rotate the screen on the emulator, so it's difficult to debug that way.

    Does this issue sound familiar to anyone?

  • This turned out to be one of the AndroidManifest.xml settings Qt doesn't expose - the android:configChanges field on the activity tag. Once I added in "uiMode|screenLayout|screenSize|smallestScreenSize", the screen rotation worked again.

Log in to reply