KivyMD
KivyMD copied to clipboard
Fix a step in the MDSlider widget
At the moment, a step with the float type is not supported in the MDSlider
widget:
from kivymd.app import MDApp
from kivymd.uix.slider import MDSlider, MDSliderHandle, MDSliderValueLabel
class Test(MDApp):
def build(self):
return MDSlider(
MDSliderHandle(), MDSliderValueLabel(), step=0.1
)
Test().run()
Oupout:
File "kivymd/uix/slider/slider.py", line 283, in update_points
for i in range(0, slider_max_value + 1, step):
TypeError: 'float' object cannot be interpreted as an integer