[solved] Add object to ListModel statically
-
I need to create ListModel, that contains object (string and bool inside) statically. If i add to empty ListModel element by using append - all works well
@
property ListModel qwe: ListModel {}
var image { value: "picture.png", imageType: 1 }qwe.append({
text: "TextToAdd",
image: imageToADD,
position: 1
})
// This works correct
@
But i need to create ListModel statically and it doesnt work^
@
ListModel {
ListElement {
text: "TextToAdd"
image: { value: "Qwer.png", imageType: 1 } // <-- This doesnt work
position: 1
}
}
@
How it should look like?