Fix API
This commit is contained in:
parent
f79c3833bd
commit
112fb3f78a
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user