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

[Solved]Loader, set Component as SourceComponent using JavaScript-Function

$
0
0
Hello, i would really like to set a Component as the sourceComponent of my Loader. Loader {     id: compLoader     x: 20; y: 20     width: 300; height: 300     sourceComponent: Rectangle { } } It works fine that way, but i would like to dynamically assign the sourceComponent using Javscript: function setSrcComp(){     compLoader.sourceComponent = Rectangle } Well, that doesn’t work. Is there any workaround? — Attach — Currently reading into dynamic qml object creating, maybe this is what i am searching for. — Solved — I am using dynamic object creation instead of a loader now.

Viewing all articles
Browse latest Browse all 4972

Trending Articles