Answer the question
In order to leave comments, you need to log in
How to end a thread?
How to terminate a thread by passing the value running = false?
def threadBazos(self):
self.thread_1 = QtCore.QThread()
self.parserBazos = ParserBazos()
self.parserBazos.moveToThread(self.thread_1)
self.parserBazos.newTextSignalBazos.connect(self.addNewItemBazos)
self.parserBazos.newCountSignalBazos.connect(self.addCountBazos)
self.thread_1.started.connect(self.parserBazos.run)
self.thread_1.start()
def threadStop(self):
self.thread_1.running = False
class ParserBazos(QtCore.QObject):
running = False
def run(self):
running = True
.........
while running:
main()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question