PyQt5 – QThread: Destroyed while thread is still running

The problem is solved by passing him as a parent to self. You must change:

thread = QThread()

to:

thread = QThread(parent=self)

Leave a Comment