I am implemeting Multiple add button programmatically. I sucessfully add button but I can't able get click event for all button. I am always getting click on last added button.
I want separately click event for all button.
I am using this code for add button.
ComponentDefinition {
id: mComponentDefinitionSubmitButton
Button {
id: mButtonID
horizontalAlignment: HorizontalAlignment.Center
onClicked: {
//My Click code. Always detect last button.
}
}
}
var mButton = mComponentDefinitionSubmitButton.createObject();
mButton.text = qsTr(title)
mContainerButton.add(mButton)