I create signal in start function intheotherwords−"waitforsignal":
self.connectself.s1,QtCore.SIGNAL(′printStat(PyQtPyObject'),self.printStat)
s1 - child thread;
printStatPyQtPyObject - signal name, which send from thread s1 to main thread;
self.printStat - function for our reaction by signal self=QMainWindow( ).
I create sending signal in child thread:
self.emitQtCore.SIGNAL(′printStat(PyQtPyObject'),listoftransfervars)
I can transfer any PyQt- or/and Python-objects.
Function printStat must get transfer objects:
def printStat(self, [list of transfer vars]):
self.connectself.s1,QtCore.SIGNAL(′printStat(PyQtPyObject'),self.printStat)
s1 - child thread;
printStatPyQtPyObject - signal name, which send from thread s1 to main thread;
self.printStat - function for our reaction by signal self=QMainWindow( ).
I create sending signal in child thread:
self.emitQtCore.SIGNAL(′printStat(PyQtPyObject'),listoftransfervars)
I can transfer any PyQt- or/and Python-objects.
Function printStat must get transfer objects:
def printStat(self, [list of transfer vars]):
Комментариев нет:
Отправить комментарий