-
Bug
-
Resolution: Fixed
-
P4: Low
-
5.5.0
-
None
-
-
d69e226e3 (dev), 954f2f5b3 (6.10), 37926c5d4 (6.9), ffc292ca7 (tqtc/lts-6.8)
-
2025wk34s2QtforAndroid
The screen orientation is correctly updated when the device is rotated by steps of 90°, but when it's rotated by 180° in one movement, the orientation is not updated.
Here is a code that reproduce the issue :
import QtQuick 2.5 import QtQuick.Controls 1.4 import QtQuick.Window 2.2 ApplicationWindow { visible: true width: 640 height: 480 Component.onCompleted: { Screen.orientationUpdateMask = Qt.PrimaryOrientation | Qt.LandscapeOrientation | Qt.PortraitOrientation | Qt.InvertedLandscapeOrientation | Qt.InvertedPortraitOrientation; } Text { text: "orientation : " + orientationString(Screen.orientation) font.pointSize: 30 anchors.centerIn: parent } function orientationString(orientation) { switch (orientation) { case Qt.PrimaryOrientation: return "Primary"; case Qt.LandscapeOrientation: return "Landscape"; case Qt.PortraitOrientation: return "Portrait"; case Qt.InvertedLandscapeOrientation: return "Inverted Landscape"; case Qt.InvertedPortraitOrientation: return "Inverted Portrait"; default: return "Unknown"; } } }
Tested on Nexus 9 (Android 5) and Nexus 5 (Android 6 dev preview)