import QtCore import QtQuick import QtQuick.Controls import QtQuick.Controls.Basic import QtQuick.Layouts import QtQuick.Window ApplicationWindow { id: root width: 640 height: 480 visible: true title: Qt.application.displayName Button { anchors.top: parent anchors.horizontalCenter: parent.horizontalCenter text: "Open drawer" onClicked: drawer.open() } Drawer { id: drawer width: parent.width height: parent.height * 2 / 3 edge: Qt.BottomEdge contentItem: ColumnLayout { anchors.fill: parent Text { Layout.alignment: Qt.AlignCenter text: qsTr("Swipe to close drawer") } ListView { id: listView Layout.fillWidth: true Layout.fillHeight: true clip: true model: 100 delegate: Rectangle { width: listView.width height: 32 color: model.index % 2 === 0 ? "lightGray" : "gray" Text { anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter text: model.index } } } } } }