Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Dynamic QML loading and import path

$
0
0
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)

Viewing all articles
Browse latest Browse all 4972

Trending Articles