Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-130929

Android screenOrientation doest not work always

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.8.0
    • QPA: Android
    • None
    • Android
    • 2024wk46s3FOQtforAndroid

    Description

      hello,

       

      when I create new QtProject, generate AndroidManifest.xml and put android:screenOrientation="portrait" into activity, and run it on SDK34 emulator,

      on small screen emulator:

      it works fine, and when i try to rotate, it looks as expected:

       

      however when using emulator for tablets where screen is big:

      then unexpected rotation works:

       - here of course as I am clicking on buttons to rotate, then it rotates and content of app stays so its always readable for user (which is unexpected... when setting the manifest as set, then content should not flip and shoudl stay ALWAYS in portrait width/height)

      also (only in tablet) this trigger and prints to console as should not (phone does not trigger this change):

      property int screenOrientation: Screen.orientation
      onScreenOrientationChanged: console.log("ScreenOrientation:", screenOrientation)

       

      I search everywhere and it is NOT possile in manifest set orientation for different devices,

      its possible only programaticaly, therefore I think there is something wrong in Qt activity handling

       

      How to lock an Android apps orientation in Android Studio

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            assam Assam Boudjelthia
            shokarta Jiri Zaloudek
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes