From b3f865c86c7a000efec39222c4c22b53f757f1b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Sun, 11 Jul 2021 18:20:21 +0800 Subject: Signup button deactivated after pressed once and the busy indicator will show up and run, because it takes a while to create the catalog. --- main.qml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 + } } -- cgit v1.2.3