Unsolved Passing values to Component Properties?
-
HI, I was wondering if there is a way to pass values to a property on a qml component. For example I want to pass a string to my component:
var name = "Fred"
var component = Qt.createComponent("myComponent.qml");
component.name = name;Thanks
-
Yes it's possible once the component is ready & and object created. See the docs https://doc.qt.io/qt-5/qtqml-javascript-dynamicobjectcreation.html#creating-a-component-dynamically