Python time.sleep on line 2 happens before line 1 -
self.output.clear() self.output.append("text should see 2 sec") time.sleep(2) self.output.clear()
you supposed see text in window 2 seconds should clear , continue sleep happens before text shows , continues clear, not showing text @ all. know fix this?
self.mytimer = qtimer() self.mytimer.singleshot(2000, lambda: self.output.clear())
Comments
Post a Comment