diff --git a/traitsui/qt/extra/range_slider.py b/traitsui/qt/extra/range_slider.py index 9eed87fd9..7c2d66613 100644 --- a/traitsui/qt/extra/range_slider.py +++ b/traitsui/qt/extra/range_slider.py @@ -78,8 +78,8 @@ def paintEvent(self, event): else: opt.activeSubControls = self.hover_control - opt.sliderPosition = value - opt.sliderValue = value + opt.sliderPosition = int(value) + opt.sliderValue = int(value) style.drawComplexControl( QtGui.QStyle.ComplexControl.CC_Slider, opt, painter, self ) @@ -103,7 +103,7 @@ def mousePressEvent(self, event): self.active_slider = -1 for i, value in enumerate([self._low, self._high]): - opt.sliderPosition = value + opt.sliderPosition = int(value) hit = style.hitTestComplexControl( style.CC_Slider, opt, event.pos(), self )