D
D
del4pp2020-04-20 15:56:18
Python
del4pp, 2020-04-20 15:56:18

How to run a function on a thread, PYQT?

The problem is this:
There is a function, it needs to be run in a thread, I do it like this:

self.mltpr = threading.Thread(target=self.startFunction, args=())
self.mltpr.start()


From time to time I get an error - QWidget::repaint: Recursive repaint detected I
also tried to run it through _thread, then it works, but I read somewhere that it is impossible to do this.
How to run a function in a separate thread without creating an additional class to work with the thread?
(I know how to use Google)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bbkmzzzz, 2020-04-20
@bbkmzzzz

Using PyQt and without a class - it's okay to
use QThread or QRunnable in conjunction with QThreadPool
In a large framework - its tools

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question