summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-11 18:20:21 +0800
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2021-07-11 18:20:21 +0800
commitb3f865c86c7a000efec39222c4c22b53f757f1b6 (patch)
tree5fd4dfc744eeac35095a7ce1dd73a4b4caa7689b
parentfef05b7510d4e6ef2ac846e9324a88d1f3f805d3 (diff)
Signup button deactivated after pressed once
and the busy indicator will show up and run, because it takes a while to create the catalog.
-rw-r--r--main.qml16
1 files changed, 15 insertions, 1 deletions
diff --git a/main.qml b/main.qml
index 41c04a5..304bfe0 100644
--- a/main.qml
+++ b/main.qml
@@ -6,6 +6,8 @@ ApplicationWindow {
property string imageBase
signal signUp(string brand)
function pushCatalog() {
+ busy.visible = false
+ busy.running = false
stack.push("Catalog.qml")
}
id: window
@@ -39,9 +41,21 @@ ApplicationWindow {
}
loginButton {
text: qsTr("Mulai berjualan!")
- onClicked: signUp(emailTextField.text)
+ onClicked: {
+ this.enabled = false
+ busy.running = true
+ busy.visible = true
+ signUp(emailTextField.text)
+ }
}
}
}
}
+
+ BusyIndicator {
+ id: busy
+ anchors.centerIn: parent
+ visible: false
+ running: false
+ }
}