I am trying to find a way to update a GUI thread from a Python thread outside the main one. The PyQt5 docs on sourceforge have good instructions on how to do this. But I still can't get it to work.
Is there a good way to explain the following result of an interactive session? Should there be a way to call the emit method on these objects?
>>> from PyQt5.QtCore import QObject, pyqtSignal >>> obj = QObject() >>> sig = pyqtSignal() >>> obj.emit(sig) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'QObject' object has no attribute 'emit'
and
>>> obj.sig.emit() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'QObject' object has no attribute 'sig'
and
>>> obj.sig = pyqtSignal() >>> obj.sig.emit() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'PyQt5.QtCore.pyqtSignal' object has no attribute 'emit'
user-interface pyqt5 qt-signals pyqt
Adb
source share