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

With Android, when phone is rotated, Screen.primaryOrientation and screen geometry change but not Screen.orientation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.2.1, 5.4.0 Alpha
    • Fix Version/s: 5.4.0 Beta
    • Labels:
      None
    • Environment:
      Windows 7 - Qt Creator 3.1.0 - Android 4.4.2
      Samsung Galaxy S1 2.3.3 and Samsung Galaxy S2 4.1.2
    • Platform/s:
      Android

      Description

      When starting the application with the phone in Portrait:

      • Screen.orientation equals Qt::PortraitOrientation
      • Screen.primaryOrientation equals Qt::PortraitOrientation
      • Screen.width equals 480 and Screen.height equals 762

      When moving the phone to landscape:

      • Screen.orientation still equals Qt::PortraitOrientation
      • Screen.primaryOrientation changes to Qt::LandscapeOrientation
      • Screen.width equals 800 and Screen.height equals 442

      I would expect that Screen.orientation changes also to Qt::LanscapeOrientation as well to ensure this statement is true:

      If primaryOrientation == orientation, it means that the screen automatically rotates all content which is displayed, depending on how you hold it. But if orientation changes while primaryOrientation does NOT change, then probably you are using a device which does not rotate its own display. In that case you may need to use Item.rotation or Item.transform to rotate your content.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-38699
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              ablasche Alex Blasche
              Reporter:
              agroyer Anthony Groyer
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes