researching: tried to close drawer easily

This commit is contained in:
ronoaer 2023-09-20 00:18:10 +08:00
parent d4d6fbab88
commit 893ec2d61c

View file

@ -2,6 +2,7 @@ import QtQuick
import QtQuick.Controls
Drawer {
id: drawer
property bool needCloseButton: true
Connections {
@ -66,4 +67,16 @@ Drawer {
PageController.updateNavigationBarColor(initialPageNavigationBarColor)
}
}
MouseArea {
id: mouseArea
anchors.fill: parent
onCanceled: {
Drag.cancel()
drawer.close()
}
preventStealing: false
}
}