My QML file should look something like this
Rectangle {
id: rect
width: 500
height: 500
color: "#654321"
Text {
text: Group1.SetA.myText
anchors.centerIn: parent
}
}
Somewhere in my C code I would like to do something like below to update the text
RootContext->setContextProperty(“Group1.SetA.myText”, “ValueString”);
OR
myViewer->setProperty(“Group1.SetA.myText”, “ValueString”);
Is that possible ? Can we use period/dot in qml property names? If not, is there any other way ?
↧