mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Handle signal when file is choosed
This commit is contained in:
parent
f6cd3b42ad
commit
2404696003
@ -38,6 +38,10 @@ Item
|
||||
CustomFileChooser
|
||||
{
|
||||
id: fileChooser
|
||||
onResultFileChanged:
|
||||
{
|
||||
console.log("Result file changed! " , resultFile)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ Item
|
||||
{
|
||||
id: compRoot
|
||||
|
||||
property var resultFile
|
||||
|
||||
FileDialog
|
||||
{
|
||||
id: fileDialog
|
||||
@ -14,6 +16,7 @@ Item
|
||||
visible: false
|
||||
onAccepted: {
|
||||
console.log("You chose: " + fileDialog.fileUrls)
|
||||
resultFile = fileDialog.fileUrls
|
||||
}
|
||||
onRejected: {
|
||||
console.log("Canceled")
|
||||
@ -26,7 +29,7 @@ Item
|
||||
if (Qt.platform.os === "android")
|
||||
{
|
||||
console.log("ImagePicker Android platform detected")
|
||||
mainWindow.addUriHandler("/media", androidResult)
|
||||
mainWindow.addUriHandler("media", androidResult)
|
||||
androidImagePicker.openPicker()
|
||||
}
|
||||
else
|
||||
@ -38,7 +41,8 @@ Item
|
||||
function androidResult (uri)
|
||||
{
|
||||
console.log("Android image uri found" , uri)
|
||||
|
||||
resultFile = uri
|
||||
mainWindow.delUriHandler("media", androidResult)
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user