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

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -