06-19-2013 12:55 PM
in the qml i have a ListView with a DataModel. The DataModel contains a Label and ImageView.
I set the ImageView and Label like this
QFile file(picture_file); // file stored on the device
// the file path would like something like this
entry["image"] = QUrl(qmlPath);
entry["name"] = "Text";
this all works on 10.0.9 but when I recompile the app target to 10.1 or higher the picture does not show up. The label does.
Also, if i set the imagesource to the asset folder the image shows up fine.
entry["image"] = "asset:///images/template.png";
What is the correct way to set the imageSource for ImageView?
Solved! Go to Solution.