class WorkerSignals(QtCore.QObject): ''' Defines the signals available from a running worker thread. Supported signals are: finished No data error `tuple` (exctype, value, traceback.format_exc() ) result `object` data returned from processing, anything progress `int` indicating % progress ''' finished = QtCore.Signal() error = QtCore.Signal(tuple) result = QtCore.Signal(object) progress = QtCore.Signal(int)
class Element(QtCore.QObject): loaded = QtCore.Signal() def __init__(self, parent=None): super(Element, self).__init__(parent) self._is_loaded = False self._token_data = None @property def token_data(self): return self._token_data @QtCore.Slot() def set_loaded(self): self._is_loaded = True self.loaded.emit() @QtCore.Slot(str) def set_token_data(self, value): self._token_data = value