remove fileDialog

This commit is contained in:
Chris Cochrun 2024-09-12 09:51:43 -05:00
parent 66f313675b
commit f231b81bf4

View file

@ -90,7 +90,7 @@ Item {
text: "Select Image"
icon.name: "fileopen"
hoverEnabled: true
onClicked: fileDialog.open()
onClicked: fileHelper.loadFile("Please choose a background", "image")
}
}
}
@ -138,21 +138,6 @@ Item {
}
}
FileDialog {
id: fileDialog
title: "Please choose a background"
folder: shortcuts.home
selectMultiple: false
nameFilters: ["Image files (*.jpg *.jpeg *.png *.JPG *.JPEG *.PNG *.webp *.gif)", "All files (*)"]
onAccepted: {
updateImage(fileDialog.fileUrls[0]);
console.log("image background = " + fileDialog.fileUrls[0]);
}
onRejected: {
console.log("Canceled")
}
}
function changeImage(index) {
let img = imageProxyModel.getImage(index);
root.image = img;