I am making a gui with multiple QSlider in a scrollarea, for some of my sliders i need an interval of 10 and not 1.
When i open the gui the ticks are correct and have a jump of 10, but when i return the current value i can still get values that are between the ticks, for example:
slider = QtGui.QSlider(QtCore.Qt.Horizontal)
slider.setMaximum(90)
slider.setMinimum(10)
slider.setTickInterval(10)
slider.setTickPosition(QtGui.QSlider.TicksBelow)
slider.valueChanged.connect(self.slider_value_change)
The function is just:
def slider_value_change(self,value):
print(value)
This code will return 10,11,12,13... instead of 10,20...
Is there a way to keep the value so it will only return the tick values? Also is there a way to add a lable to the tick with its value?