我在我的 GUI 应用程序中使用 QSlider,以便在 QSlider 中更改值后执行繁重的任务。我这样做如下。
self.slider.valueChanged.connect(self.value_changed) # Inside __init__() function
def value_changed(self): # Inside the class
# Do the heavy task
但是我无法顺利更改滑块的值,因为每次更改值时都在运行繁重的任务。
我需要的是在值更改后运行繁重的任务,但前提是滑块的值暂时没有变化。
我不知道如何在 python 中做到这一点。任何帮助..?