QML学习
main.qml
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
Window {
width: 640
height: 480
visible: true
title: qsTr("Drawer")
Drawer {
id: drawer
width: parent.width / 4
height: parent.height
// 从屏幕左边滑出来
edge: Qt.LeftEdge
// 可以从屏幕边缘拉出来
interactive: true
// 内部视图不能超出抽屉视图边界显示
clip: true
// 关闭策略
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
// 设置模态
modal: true
// 模态背景变暗
dim: true
// 绘制抽屉背景视图
background: Rectangle{
anchors.fil