M
M
medoedoff2017-04-13 14:23:51
Python
medoedoff, 2017-04-13 14:23:51

Callback functions in Threads?

I use the threading module, I create a new thread (Thread). Everything is fine, but I need the callback function to be called in the main thread when the thread ends, otherwise pyqt5 swears.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail, 2017-04-21
@medoedoff

If using pyqt5 then why not use QThread instead of threading? Upon completion of work, it will send a signal finished () to which you can connect the callback slot.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question