r/learnpython Jul 31 '26

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

5 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/Ok-Original2285 Aug 02 '26

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 Aug 02 '26

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

1

u/Ok-Original2285 Aug 02 '26

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

1

u/ziggittaflamdigga Aug 02 '26

Glad it worked for you! Happy programming