1、获取滑动条当前值:
滑动条名称.value()
self.threshold1 = self.horizontalSlider.value() self.threahold2 = self.horizontalSlider_2.value()
2、滑动条值改变信号绑定槽函数
滑动条名称.valueChanged.connect(槽函数)
# 滑条值变化 self.horizontalSlider.valueChanged.connect(self.SliderValueChangedSlot) self.horizontalSlider_2.valueChanged.connect(self.SliderValueChangedSlot) self.horizontalSlider_3.valueChanged.connect(self.SliderValueChangedSlot)