feat: Allow image drag/drop

This commit is contained in:
Kemal Hadimli 2023-08-13 00:21:31 +01:00
parent b49408781a
commit dcb392cbf0

View file

@ -342,6 +342,20 @@ ApplicationWindow {
} }
} }
} }
DropArea {
anchors.fill: parent
onEntered: {
if (drag.active && mimeData.hasUrls()) {
drag.acceptProposedAction()
}
}
onDropped: {
if (drop.urls && drop.urls.length > 0) {
onFileSelected(drop.urls[0].toString())
}
}
}
} }
} }