Answer the question
In order to leave comments, you need to log in
PyQT5 how to make ProgressBar and lcdnumber work in thread?
Hello.
I am making a program on pyqt5, everything works correctly without threads, but when the thread is started, the progressbar and lcdnumber elements do not work.
I debugged the variables with a print, everything outputs as it should, but the elements do not work.
Stream code:
class YourThreadName(QtCore.QThread):
def __init__(self):
QtCore.QThread.__init__(self)
def __del__(self):
self.wait()
def run(self):
M_Start_Screen().startTest()
def startTest(self):
...
for index in range(100):
...
self.progressBar.setValue(index)
self.lstSender.display(Index)
self.lstSender.repaint()
index += 1
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