diff --git a/main.py b/main.py index a42e369..ccc84e3 100644 --- a/main.py +++ b/main.py @@ -55,7 +55,8 @@ def start_typing(self): self.startButton.setEnabled(False) self.stopButton.setEnabled(True) - QTimer.singleShot(delay * 1000, lambda: self.initiate_typing(text, interval, type_enter, chars_per_stroke)) + time.sleep(delay) + self.initiate_typing(text, interval, type_enter, chars_per_stroke) def initiate_typing(self, text, interval, type_enter, chars_per_stroke): self.thread = TypingThread(text, interval, type_enter, chars_per_stroke) @@ -66,7 +67,7 @@ def initiate_typing(self, text, interval, type_enter, chars_per_stroke): def update_progress(self, value): self.progressBar.setValue(value) - + def typing_finished(self): self.startButton.setEnabled(True) self.stopButton.setEnabled(False)