1
0

qt BlockingWaitingDialog: try harder to get label drawn (refresh bug)

This commit is contained in:
SomberNight
2021-01-06 02:29:59 +01:00
parent 85f76523b6
commit 4b5616ff14

View File

@@ -332,9 +332,14 @@ class BlockingWaitingDialog(WindowModalDialog):
self.message_label = QLabel(message)
vbox = QVBoxLayout(self)
vbox.addWidget(self.message_label)
# show popup
self.show()
# refresh GUI; needed for popup to appear and for message_label to get drawn
QCoreApplication.processEvents()
QCoreApplication.processEvents()
# block and run given task
task()
# close popup
self.accept()