qt_multithreading_wrapper module

class Worker(fn, *args, **kwargs)[source]

Bases: PyQt5.QtCore.QRunnable

Worker thread

Inherits from QRunnable to handler worker thread setup, signals and wrap-up.

Parameters
  • callback (function) – The function callback to run on this worker thread. Supplied args and kwargs will be passed through to the runner.

  • args – Arguments to pass to the callback function

  • kwargs – Keywords to pass to the callback function

run()[source]

Initialise the runner function with passed args, kwargs.

class WorkerSignals[source]

Bases: PyQt5.QtCore.QObject

Defines the signals available from a running worker thread.

Supported signals are:

finished

No data

Type

pyqtSignal

error

tuple (exctype, value, traceback.format_exc() )

Type

pyqtSignal

result

object data returned from processing, anything

Type

pyqtSignal

error
finished
result
started