1class DataCaptureThread(QThread):
2 def collectProcessData(self):
3 print ("Collecting Process Data")
4
5 def __init__(self, *args, **kwargs):
6 QThread.__init__(self, *args, **kwargs)
7 self.dataCollectionTimer = QTimer()
8 self.dataCollectionTimer.moveToThread(self)
9 self.dataCollectionTimer.timeout.connect(self.collectProcessData)
10
11 def run(self):
12 self.dataCollectionTimer.start(1000)
13 loop = QEventLoop()
14 loop.exec_()
15