Browse Source

Log to find if the Wait-Thread actually runs

master
Nils 4 years ago
parent
commit
7390c76b6c
  1. 4
      qtgui/waitdialog.py

4
qtgui/waitdialog.py

@ -37,6 +37,7 @@ class WaitThread(QtCore.QThread):
self.wait()
def run(self):
logger.info(f"Thread running {self.longRunningFunction}")
self.longRunningFunction()
@ -58,7 +59,7 @@ class WaitDialog(QtWidgets.QMessageBox):
self.setWindowTitle(title)
self.setInformativeText(informativeText)
self.setStandardButtons(QtWidgets.QMessageBox.NoButton) #no buttons
wt = WaitThread(longRunningFunction)
wt.finished.connect(self.realClose)
wt.start()
@ -67,6 +68,7 @@ class WaitDialog(QtWidgets.QMessageBox):
def realClose(self):
self.closeEvent = QtWidgets.QMessageBox.closeEvent
logger.info("Thread done")
self.done(True)
def keyPressEvent(self, event):

Loading…
Cancel
Save