Skip to content

Unexpected behavior when changing button color using a worker #5228

Closed Answered by willmcgugan
xp4u1 asked this question in Q&A
Discussion options

You must be logged in to vote

time.sleep isn't asynchronous, which means Textual can't do anything for 0.3 seconds. You could use asyncio.sleep, but there are better options. Consider using set_timer, rather than a worker.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xp4u1
Comment options

Answer selected by xp4u1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants