Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED] Android app screen rotation not working.

[SOLVED] Android app screen rotation not working.

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 2.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    abates
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      abates
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved