I'm trying to change Slider value with pushbutton
I did some but it is not exactly what I wanted
here is some of my code
def button_change_value(self):
self.ui.slider.setRange(0, len(self.brg1_x)-1)
self.ui.slider.setTickInterval(1)
self.size = self.ui.slider.value()
for i in range(len(self.brg1_x)-1):
self.size = self.size + 1
print(self.size)
self.ui.slider.setValue(self.size)
len (self.brg1_x)-1 is 9
if I connect button_change_value function to Qpushbutton I can see only that the slider.setValue is 9
not for 1,2,3,4,5,6,7,8.
I give you some picture for more explanation
After I click the top right play button
I can not see the slidervalue (1~8) on the Mainwindow.
How can I figure it out?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…