Waiting For A Timer To Terminate Before Continuing Running The Code
The following code updates the text of a button every second after the START button was pressed. The intended functionality is for the code to 'wait' until the timer has stopped be
The solution I found that works was to replace
whileTrue:
if not self.timer.isActive():
break
with
whileself.timer.isActive():
QtGui.QApplication.processEvents()
I'm not certain that this is the best solution, though.
Post a Comment for "Waiting For A Timer To Terminate Before Continuing Running The Code"