Hello,
I use the createComponent function as you described:
function createComponentObjects() {
component = Qt.createComponent("Foo.qml");
// here we create more things about are component
// sprite = component.createObject(appWindow, {"x": 100, "y": 100});
if (sprite == null) {
// Error Handling
console.log("Error creating object");
}
It works fine when the loaded Foo.qml file is in the same folder than my main.qml. But the goal is to have the Foo.qml in another directory than the main.qml file. The idea is to load some qmls that are only available at runtime (i.e downloaded from a remote server to a directory)
↧