Hi Guys,
I’ve been working with a combination of ImagePicker and Qt.createQmlObject to add a moveable/resizeable image onto a canvas, all works perfectly when i import a set image source, however where the image source each time is coming from the ImagePicker.selection string it would be dynamic in proper use.
Below is a basic adapt of the code removing all the other settings, and the “<THIS>” is where I need help.
var newObject = Qt.createQmlObject('import QtQuick 2.0; AppImage { source: "<THIS>" ;width: 200; height: 200}', parentItem, "dynamicSnippet1");
I have tried editing the like to be more like:
`AppImage { source: ‘ + imagePathVar + ‘ …. }
I only receive errors, I have also replaced the source with the variable name (imagePathVar) however it consistently returns undefined or errors, any ideas?
Thanks