Skip to content
Snippets Groups Projects

Add cancel button to java script confirm dialog

1 file
+ 16
5
Compare changes
  • Side-by-side
  • Inline
@@ -25,11 +25,22 @@ Kirigami.OverlaySheet {
Component {
id: confirm
Controls.Button {
text: i18n("Confirm")
onClicked: {
dialogSheet.request.dialogAccept()
dialogSheet.close()
RowLayout {
Controls.Button {
Layout.fillWidth: true
text: i18n("Confirm")
onClicked: {
dialogSheet.request.dialogAccept()
dialogSheet.close()
}
}
Controls.Button {
Layout.fillWidth: true
text: i18n("Cancel")
onClicked: {
dialogSheet.request.dialogReject()
dialogSheet.close()
}
}
}
}
Loading