Add drag and drop support.

This commit is contained in:
Black Hat
2019-05-17 19:46:59 +08:00
parent 75c5c71855
commit b4281896ba
3 changed files with 43 additions and 23 deletions

View File

@@ -23,6 +23,18 @@ Item {
room: currentRoom
}
DropArea {
anchors.fill: parent
enabled: currentRoom
onDropped: {
if (!drop.hasUrls) return
currentRoom.uploadFile(drop.urls[0])
}
}
Column {
anchors.centerIn: parent