mirror of
https://codeberg.org/vyn/mirai.git
synced 2025-07-03 10:13:42 +00:00
Use QFileDialog to chose files
This commit is contained in:
parent
375a1bfb2d
commit
7eb54cddce
5 changed files with 40 additions and 31 deletions
|
@ -8,6 +8,7 @@ import QtQuick
|
|||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Dialogs
|
||||
import Mirai
|
||||
|
||||
// WIP
|
||||
|
@ -39,10 +40,19 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
|
||||
onAccepted: {
|
||||
console.log(selectedFile)
|
||||
internal.paths = [...internal.paths, selectedFile]
|
||||
}
|
||||
}
|
||||
|
||||
AppButton {
|
||||
text: "+"
|
||||
text: "+ Add"
|
||||
onClicked: {
|
||||
internal.paths = [...internal.paths, ""]
|
||||
fileDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,4 +63,3 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue