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

Screen.onOrientationChanged is not triggered

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Invalid
    • Affects Version/s: 5.2.0 RC1
    • Fix Version/s: None
    • Component/s: QPA
    • Platform/s:
      Android

      Description

      Using Qt.onOrientationChanged is not triggered in QML except if the app is a C++/QML app and a line is added in main(). Qt.onOrientationChanged should probably always called on android?

      QScreen* screen = QGuiApplication::primaryScreen();
          //Without this line, Screen.onOrientationChanged doesn't work in qml
          screen->setOrientationUpdateMask(Qt::LandscapeOrientation| Qt::PortraitOrientation	 | Qt::InvertedLandscapeOrientation | Qt::InvertedPortraitOrientation);
      

      Test project is attached.

        Attachments

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

          Activity

            People

            • Assignee:
              esabraha Eskil Abrahamsen Blomfeldt
              Reporter:
              lasconic Lasconic
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes