From f9e991e705b55a1e471e2fe7453ebc3f9cbb39f0 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Thu, 29 Apr 2021 17:08:44 +0200 Subject: [PATCH] show percent in progress bar on install start --- igniter/install_dialog.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/igniter/install_dialog.py b/igniter/install_dialog.py index e46a7ee3dd..7c9ef7920f 100644 --- a/igniter/install_dialog.py +++ b/igniter/install_dialog.py @@ -415,12 +415,19 @@ class InstallDialog(QtWidgets.QDialog): def _installation_finished(self, status): if status >= 0: self._update_progress(100) + QtWidgets.QApplication.processEvents() self.done(3) else: self._show_console() def _update_progress(self, progress: int): self._progress_bar.setValue(progress) + text_visible = self._progress_bar.isTextVisible() + if progress == 0: + if text_visible: + self._progress_bar.setTextVisible(False) + elif not text_visible: + self._progress_bar.setTextVisible(True) def _on_exit_clicked(self): self.reject() @@ -439,7 +446,7 @@ class InstallDialog(QtWidgets.QDialog): self._mongo_input.set_invalid() msg = ( "Mongo URL should start with" - " \"mongodb://\" or \"mongodb+srv://\"" + " \"mongodb://\" or \"mongodb+srv://\"" ) else: self._mongo_input.set_valid()