Search code examples
javascriptqmlcreateobject

No createObject method in Component inside javascript


I have inlined Component like

Component {
    id: movie_delegate
    MovieListItem {
        movie: movie
    }
}

Now I'm trying to create new object like

movie_delegate.createObject

But there is no such method. But if I do like this:

var comp = Qt.createComponent("MovieListItem.qml");
var o = comp.createObject(model);

Everything works fine.


Solution

  • This issue has gone when I've fixed other error, which is a little bit weird since they were unrelated, but may be I just don't see relation. Anyway question is closed.