Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
5.15.14, 6.2.9, 6.5.2, 6.6.0 Beta2
-
Windows 10 22H2, MSVC 2019 x64
-
a1a024194 (dev), a11c89c16 (6.6), eb653882a (dev), af30efb07 (6.6), 07e269f62 (tqtc/lts-6.5), 79474b087 (dev), d8a4fda90 (6.6), d0fcada55 (dev), 084d28781 (tqtc/lts-6.5), c61525f3a (dev), a4a5d63fa (6.7), 61fa31707 (6.6), 7169e3f1f (dev), b8c8a438c (6.7)
Description
Code
https://doc.qt.io/qt-6/qml-qtquick-window.html#contentOrientation-prop says, "The recommended orientation is Screen.orientation" so we expect this code to work fine:
import QtQuick.Window 2.15 import QtQuick.Controls 2.15 Window { id: window width: 640 height: 480 visible: true contentOrientation: Screen.orientation Button { text: "Open" onClicked: popup.open() } Popup { id: popup anchors.centerIn: parent width: 320 height: 240 modal: true focus: true closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent } }
Expected outcome when clicking the Button
Popup has Landscape orientation, just like the Window. The dimming Overlay completely covers the Window at all times.
Actual outcome when clicking the Button
The Popup is rotated 90 degrees, and the dimming Overlay's width is determined by the window's height.
Platform comparisons
Here are some more detailed tests on 3 desktop platforms, using Qt 6.5.3 on a "normal" landscape desktop screen.
- "Looks good" means the Overlay fully covers the Window and the Popup has landscape orientation
- Red text means unexpected result
- Notice that Screen.orientation behaves differently on macOS compared to Windows/Linux
contentOrientation value | Looks good on Windows | Looks good on Linux | Looks good on macOS |
---|---|---|---|
Qt.PrimaryOrientation | Yes | Yes | Yes |
Qt.LandscapeOrientation | No | No | No |
Qt.PortraitOrientation | Yes | Yes (Looks normal with -platform xcb, whole window rotated with -platform wayland) | Yes |
Screen.orientation | No | No | Yes |
Attachments
Issue Links
- duplicates
-
QTBUG-69235 Quick (Popup Drawer) Rotation problem !
- Closed
- relates to
-
QTBUG-62158 [QQC2] orientation change breaks the position and size of the Popup
- Closed
-
QTBUG-122286 Overlay and Drawer edges should follow content item rotation in ApplicationWindow also
- Closed
-
QTBUG-71117 When the contentOrientation is changed for the ApplicationWindow, then the Drawer does not drag out as expected
- Closed
-
QTBUG-105148 Rotated qml combobox popup placed incorrectly
- Closed
-
QTBUG-118460 Overlay.rotation gets discarded when window is resized
- Closed