This commit is contained in:
Sebastian Kügler 2013-02-27 14:54:26 +01:00
parent f79c3833bd
commit 112fb3f78a
2 changed files with 6 additions and 1 deletions

View File

@ -71,6 +71,7 @@ PlasmaComponents.Dialog {
signal buttonClicked(int index)
onButtonTextsChanged: {
print("btex6tchanged:" + buttonTexts);
for (var i = buttonRow.children.length; i > 0; --i) {
buttonRow.children[i - 1].destroy()
}
@ -87,11 +88,13 @@ PlasmaComponents.Dialog {
property int index
onClicked: {
if (root.status == DialogStatus.Open) {
if (root.status == PlasmaComponents.DialogStatus.Open) {
print("Clicked...." + index);
root.buttonClicked(index)
root.close()
}
}
Component.onCompleted: print("++++++++++++++++++++++ COmpleted button")
}
}

View File

@ -56,6 +56,7 @@ PlasmaComponents.CommonDialog {
onRejectButtonTextChanged: internal.updateButtonTexts()
onButtonClicked: {
print("QueryDialog.buttonClicked");
if (acceptButtonText && index == 0)
accept()
else
@ -113,6 +114,7 @@ PlasmaComponents.CommonDialog {
newButtonTexts.push(acceptButtonText)
if (rejectButtonText)
newButtonTexts.push(rejectButtonText)
print("+++ new BUtton texts"+newButtonTexts)
root.buttonTexts = newButtonTexts
}
}