Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
6.7.0 Beta3
Description
Code
(Adapted from https://github.com/qt/qtdeclarative/tree/v6.7.0-beta3/tests/manual/window/rotation )
import QtQuick import QtQuick.Window import QtQuick.Controls.Basic Window { id: window width: 640 height: 480 visible: true property int virtualWidth: (window.contentOrientation === Qt.PortraitOrientation || window.contentOrientation === Qt.InvertedPortraitOrientation) ? window.height : window.width property int virtualHeight: (window.contentOrientation === Qt.PortraitOrientation || window.contentOrientation === Qt.InvertedPortraitOrientation) ? window.width : window.height // This is supposed to make it work, as hinted by https://doc.qt.io/qt-6/qml-qtquick-controls-popup.html#popup-sizing Overlay.overlay.width: window.virtualWidth Overlay.overlay.height: window.virtualHeight Overlay.overlay.anchors.centerIn: window.contentItem Item { id: container width: window.virtualWidth height: window.virtualHeight anchors.centerIn: parent // ... } }
Expected Outcomes
As soon as the Window is rotated, the Overlay is also updated and all Popups work nicely.
Actual Outcomes
Rotating the Window does not cause the Overlay to update. Popups don't work nicely.
Other observations (which might illuminate the root cause of the issue)
- If I resize the window slightly, I can "kick" the Overlay into the desired geometry/position and get nice Popups.
- However, this does not last. If I resize continuously, the Overlay flickers between "good" and "bad" states
These observations suggest that the custom bindings that I applied to Overlay.overlay are not being respected. Something keeps fighting my bindings.
Attachments
Issue Links
- is replaced by
-
QTBUG-122962 Bindings on Overlay's size and position are not respected
- In Progress
- relates to
-
QTBUG-122799 Provide a modernized and coherent story for switching between portrait and landscape views
- Reported