mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 07:55:21 +01:00
feat: Allow image drag/drop
This commit is contained in:
parent
b49408781a
commit
dcb392cbf0
1 changed files with 14 additions and 0 deletions
14
src/main.qml
14
src/main.qml
|
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue