diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/ios/qiosscreen.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosscreen.mm b/src/plugins/platforms/ios/qiosscreen.mm index 2d8ff7d8e1..b93511d755 100644 --- a/src/plugins/platforms/ios/qiosscreen.mm +++ b/src/plugins/platforms/ios/qiosscreen.mm @@ -219,7 +219,9 @@ qreal QIOSScreen::devicePixelRatio() const Qt::ScreenOrientation QIOSScreen::nativeOrientation() const { - return Qt::PortraitOrientation; + // A UIScreen stays in the native orientation, regardless of rotation + return m_uiScreen.bounds.size.width >= m_uiScreen.bounds.size.height ? + Qt::LandscapeOrientation : Qt::PortraitOrientation; } Qt::ScreenOrientation QIOSScreen::orientation() const |