I have a ListModel that I fill in the following way:
property ListModel projects: ListModel {}
property Project currentProject : null
function initialization(){
var comp = Qt.createComponent("Project.qml");
var object = comp.createObject(parent,{});
projects.append(object);
currentProject = projects.get(0)
}
Component.onCompleted: root.initialization();
And I have a error in currentProject = projects.get(0)
line.
Error text:
main.qml:14: Error: Cannot assign QObject* to Project_QMLTYPE_0*
property
toproperty QtObject currentProject : null
– hate-engine