From 16787dbae78cc8216709483c2b33bb6f3de2f65c Mon Sep 17 00:00:00 2001 From: alisterburt Date: Wed, 21 Jun 2023 11:04:34 +0100 Subject: [PATCH] proof of concept --- src/superqt/sliders/_labeled.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/superqt/sliders/_labeled.py b/src/superqt/sliders/_labeled.py index a2d45f07..f7a10e7a 100644 --- a/src/superqt/sliders/_labeled.py +++ b/src/superqt/sliders/_labeled.py @@ -150,6 +150,9 @@ def __init__(self, *args, **kwargs) -> None: def _setValue(self, value: float): """Convert the value from float to int before setting the slider value.""" + value = int(value) + if self._slider.maximum() < value: + self._slider.setMaximum(value) self._slider.setValue(int(value)) def _rename_signals(self):