summaryrefslogtreecommitdiffstats
path: root/src/webengine/ui/PromptDialog.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine/ui/PromptDialog.qml')
-rw-r--r--src/webengine/ui/PromptDialog.qml34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/webengine/ui/PromptDialog.qml b/src/webengine/ui/PromptDialog.qml
index 657bf7631..c4dcd6b98 100644
--- a/src/webengine/ui/PromptDialog.qml
+++ b/src/webengine/ui/PromptDialog.qml
@@ -43,45 +43,49 @@ import QtQuick.Layouts 1.0
import QtQuick 2.5
ApplicationWindow {
- signal input(string text);
- signal accepted;
- signal rejected;
- property alias text: message.text;
- property alias prompt: field.text;
+ signal input(string text)
+ signal accepted
+ signal rejected
+ property alias text: message.text
+ property alias prompt: field.text
width: 350
height: 100
flags: Qt.Dialog
+ onClosing: {
+ rejected();
+ }
+
function open() {
show();
}
ColumnLayout {
- anchors.fill: parent;
- anchors.margins: 4;
+ anchors.fill: parent
+ anchors.margins: 4
Text {
- id: message;
- Layout.fillWidth: true;
+ id: message
+ Layout.fillWidth: true
}
TextField {
- id:field;
- Layout.fillWidth: true;
+ id:field
+ Layout.fillWidth: true
}
RowLayout {
Layout.alignment: Qt.AlignRight
- spacing: 8;
+ spacing: 8
Button {
- text: "OK"
+ text: qsTr("OK")
onClicked: {
- input(field.text)
+ input(field.text);
accepted();
close();
destroy();
}
}
Button {
- text: "Cancel"
+ text: qsTr("Cancel")
onClicked: {
rejected();
close();