I set property of qml using C++ function (from library, I do not see implementation), after use of this function property on button is changed as expected (value which I set from c++ code), but on text is set just "My name is:" without value. My question is, how to join two strings in QML javascript function when one is result of qsTr() function and second is property set from C++?
property string name: ""
function myFunction() {
myText.text = qsTr("My Name is: ") + name;
//myText.text = qsTr("My Name is: " + name);//another try
}
Text{
id: myText
text: ""
}
Button {
text: name
}
On Button: John Smith
On Text: My Name is: