I am creating new QML screen using following code.
var newComp = Qt.createComponent(“test.qml”);
var newObject = newComp.createObject(parent, {“x”: 0, “y”: 0});
I wan to set this component to the loader.
I have tried to do it using Loader.sourceComponent = newObject;
it works but it gives me following error.
“Error: Cannot assign QObject* to QDeclarativeComponent*”
Is there any workaround for this.
Thanks.