[SOLVED] Image problem loading
-
I have a strange behavior with Image source param
I have XmlListModel wich source url is generated on the fly, depending on user choice
@
XmlListModel {
id: movies_model
query: '/api/users'onStatusChanged: { if( status === XmlListModel.Error ) console.log('Error ' + errorString()); } XmlRole{ name: "id"; query: "id/string()"} XmlRole{ name: "name"; query: "name/string()"} XmlRole{ name: "logo"; query: "logo/string()"} // absolute url to server image
}
@and when source url generated
in delegate of ListView :
@
Component {
id: list_delegateImage { id: movie_logo source: logo height: 30; width: 30; }
}
ListView {
delegate: list_delegate
}
@And when model is loaded image is empty and debug has message :
MoviesListPage.qml:69:21: QML Image: Cannot open: file:///home/developer/projects/build-Patria-Desktop_Qt_5_1_1_GCC_32bit-Debug/qml/ProjectUsers/ http://localhost/app_dev.php/media/cache/thumbnail/images/users/527b7609df4c7.png
Some how when image take role name logo data, it trying merge absolute path to the qml with data from xml
Did somebody meet such problems ? Any help ?!
-
Nope the same result (( It's strange, the debug shows that logo has only url. So it must work. But debug shows that image trying loading full path to qml + given url separted by space
-
Using Qt 5.1 release
-
Meeeeeeeen thx... This must be in docs !!!
It's working !! I didn't expected that the space brokes all.