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 )