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

View File

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