How to call c++ function from qml and change the lable text
问题 I'm new to Blackberry 10 development. I've created simple BB 10 cascades project. I want to change the text of a label through c++ function. main.qml import bb.cascades 1.0 Page { content: Container { id: containerID Button { id: button1 objectName: "button" text: "text" onClicked: { btnClicked("New Label Text"); } } Label { id: label1 objectName: "label1" text: "Old Label Text" } } } Now in which file i've to declare and in which file i've to define the function btnClicked(QString) function.