mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
show percent in progress bar on install start
This commit is contained in:
parent
d169e075ba
commit
f9e991e705
1 changed files with 8 additions and 1 deletions
|
|
@ -415,12 +415,19 @@ class InstallDialog(QtWidgets.QDialog):
|
||||||
def _installation_finished(self, status):
|
def _installation_finished(self, status):
|
||||||
if status >= 0:
|
if status >= 0:
|
||||||
self._update_progress(100)
|
self._update_progress(100)
|
||||||
|
QtWidgets.QApplication.processEvents()
|
||||||
self.done(3)
|
self.done(3)
|
||||||
else:
|
else:
|
||||||
self._show_console()
|
self._show_console()
|
||||||
|
|
||||||
def _update_progress(self, progress: int):
|
def _update_progress(self, progress: int):
|
||||||
self._progress_bar.setValue(progress)
|
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):
|
def _on_exit_clicked(self):
|
||||||
self.reject()
|
self.reject()
|
||||||
|
|
@ -439,7 +446,7 @@ class InstallDialog(QtWidgets.QDialog):
|
||||||
self._mongo_input.set_invalid()
|
self._mongo_input.set_invalid()
|
||||||
msg = (
|
msg = (
|
||||||
"Mongo URL should start with"
|
"Mongo URL should start with"
|
||||||
" \"mongodb://\" or \"mongodb+srv://\""
|
" <b>\"mongodb://\"</b> or <b>\"mongodb+srv://\"</b>"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self._mongo_input.set_valid()
|
self._mongo_input.set_valid()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue