I was making an application in PyQt5 and needed to update a label continuously. Here is my code:
count = 0
def update():
global count
count += 1
theLabel.setText(str(count))
while True:
threading.Thread(target=update).start()
But, what ends up happening is that the window simply crashes without updating the label at all. I was wondering if there is a better way to do this without crashing the window. TIA