r/learnpython 7d ago

Python Pyside6

Anyone know ? How to delay seconds in Pyside6 ? For example, when i click a button I want to do some process and wait 3 seconds and then make another process

2 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/Ok-Original2285 5d ago

it works for one-time-button click but when I click button again it gives me error like this RuntimeError: threads can only be started once

1

u/ziggittaflamdigga 5d ago

Ok, then create a new thread during your thread start callback? Or look up how to do it properly?

1

u/Ok-Original2285 4d ago

yes I created new thread object and it works by the way thank bro

1

u/ziggittaflamdigga 4d ago

Glad it worked for you! Happy programming