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