I've already tried to do so... But i don't understand how to make it working:
Code:
//file MessageBoxQuestion
Rectangle {
signal pushedYes
signal pushedNo
.......
//has 2 buttons and when they are clicked, then these 2 signals are emitted
}
//file my dialog
Rectangle {
id: listDialog
MessageBoxQuestion {
id: msgQuestion
}
....
SimpleButton {
id: deleteData
....
onClicked: {
msgQuestion.state = "show"
msgQuestion.onPushedYes: {
//delete data
}
msgQuestion.onPushedNo: {
//do nothing
}
.....
}
.....
}
I tried this way, but it is not working because it is forbidden to write msgQuestion.onPushedYes: in onClicked of SimpleButton..