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

Screen.onOrientationChanged is not triggered

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 5.2.0 RC1
    • QPA
    • 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

            esabraha Eskil Abrahamsen Blomfeldt
            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