[Qt-interest] QSlider modification
Ross Bencina
rossb-lists at audiomulch.com
Wed Jan 27 08:27:01 CET 2010
Hi André
>I am running into a little problem.
>I am trying to create an application where I have a set of sliders.
>These sliders are interdependent. The total value of all the sliders is
>bound to a maximum. That means that once that maximum is reached, one of
>the sliders first has to be moved down before any of the others can be
>moved up further.
>Can anyone suggest an approach for this?
How about just connecting to the valueChanged() slot and if you detect that
the value is above your "pseudo maximum" just reset the value back down to
that pseudo maximum. It might work, not sure. Since screen redraws are
deferred this shouldn't generate any flicker (in theory).
If it was my UI I'd be careful to provide the user with some feedback about
where these limits are otherwise it's going to be pretty confusing having
sliders "stuck" halfway up..
HTH
Ross.
More information about the Qt-interest-old
mailing list