0

我在 PyQt5 中制作应用程序,需要不断更新标签。这是我的代码:

count = 0

def update():
    global count
    count += 1
    theLabel.setText(str(count))

while True:
    threading.Thread(target=update).start()

但是,最终发生的事情是窗口根本没有更新标签就崩溃了。我想知道是否有更好的方法来做到这一点而不会崩溃窗口。TIA

4

0 回答 0