Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.2
-
None
-
Qt Commercial 5.11.2
macOS 10.14
Xcode 10.0
Qt Creator 4.7.1
-
-
feed3b7b8077f2c9bba72c49e249fb96c262d72e
Description
The QML Drawer component goes into an infinite layout loop under these conditions:
- Drawer edge is set to Qt.TopEdge
- Drawer parent is set to something that is not full screen height
See attached example project that recreates the problem. Just click the "Toggle Drawer" button.
If the header is set to height of 0 or the edge is changed to something other than TopEdge, the drawer works as expected.
import QtQuick 2.11 import QtQuick.Window 2.11 import QtQuick.Controls 2.4 ApplicationWindow { id: applicationWindow visible: true width: 640 height: 480 title: qsTr("Hello World") header: Rectangle { color: "red" // Make my height 0 and no lockup. height: 40 } Button { anchors.centerIn: parent text: "Toggle Drawer" onClicked: drawer.opened ? drawer.close() : drawer.open() } Drawer { id: drawer width: applicationWindow.width height: 0.2 * applicationWindow.height // Parenting to something not full screen height seems to break TopEdge mode. parent: applicationWindow.contentItem // Change me to left or right and no lockup. edge: Qt.TopEdge Label { anchors.centerIn: parent text: "a drawer" } } }
Attachments
Issue Links
- is duplicated by
-
QTBUG-71932 Drawer: Support anchoring on Item
- Closed