PyQt5 QThread Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
Giuseppe Corbelli
corbelligiuseppe at mesdan.it
Wed Jun 30 15:30:36 BST 2021
On 6/30/21 1:37 PM, Demosthenes Koptsis wrote:
> i have a GUI with PyQt5. The GUI has a Form, 2 Buttons and a
> ProgressBar. I want to implement a start/wait thread with QThread.
> Unfortunately i get Process finished with exit code 139 (interrupted by
> signal 11: SIGSEGV) when i click Start button to run thread.
...
> class MainWindow(QWidget, QThread):
This is the root of all problems. UI (QWidget) subclasses must live in
the main thread.
Besides that you usually do NOT subclass QThread [1] but moveToThread()
a QObject subclass and communicate with signals and slots.
[1] https://www.qt.io/blog/2010/06/17/youre-doing-it-wrong
--
Giuseppe Corbelli
More information about the PyQt
mailing list