QSpinbox wrapped
-
Keep the previous value and compare the new value when change is signalled?
If prev value == max() and new value is less then it went from max to min,
if prev value == min and new value is greater then it went from min t o maxor am I incorrect?
-
@Perdrix said in QSpinbox wrapped:
was hoping for a signal or event that was already implemented.
So why not simply looking in the documentation then?
-
@Perdrix said in QSpinbox wrapped:
Is there an easy way to detect that a spin box value has wrapped and in which direction it has wrapped?
I think I would actually most likely do this by subclassing and overriding void QAbstractSpinBox::stepBy(int steps). That feels like the correct level to recognise the situation from all the applicable inputs, and not mistakenly act on
setValue()
from code. -
@Christian-Ehrlicher I did look but didn't see an easy way to do that - which is why I asked.