Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.7.0 Beta3
-
None
-
7169e3f1f (dev), b8c8a438c (6.7)
Description
Code
import QtQuick import QtQuick.Controls.Basic Window { width: 640 height: 480 visible: true contentOrientation: orientationButton.checked? Screen.orientation : Qt.PrimaryOrientation Button { id: orientationButton text: checked ? "LandscapeOrientation" : "PrimaryOrientation" checkable: true } ComboBox { y: parent.height/2 model: ["Alpha", "Bravo", "Charlie"] } }
Expected outcomes (contentOrientation == Qt.PrimaryOrientation)
Actual outcomes (contentOrientation == Screen.orientation == Qt.LandscapeOrientation)
Culprit
https://github.com/qt/qtdeclarative/blob/v6.7.0-beta3/src/quicktemplates/qquickpopuppositioner.cpp#L130-L131 transposes based on orientation, which it shouldn't:
if (p->window->contentOrientation() == Qt::LandscapeOrientation || p->window->contentOrientation() == Qt::InvertedLandscapeOrientation) bounds = bounds.transposed();
This error probably came from the same source as the one that caused QTBUG-115536 (https://codereview.qt-project.org/c/qt/qtdeclarative/+/518328 )
Attachments
For Gerrit Dashboard: QTBUG-123114 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
547038,3 | Popup: Don't transpose bounds based on contentOrientation | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
552744,2 | Popup: Don't transpose bounds based on contentOrientation | 6.7 | qt/qtdeclarative | Status: MERGED | +2 | 0 |