Reputation: 2543
I am maintaining an application which tries to help the user get his parameters to work together, as there are many interdependencies.
Now there is a default value of x for a variable Y. When the user changes some other variable Z, there might be a new minimum value for Y which is greater than x. This is set as a minimum for the spinbox. Now the spinbox can not display the current value anymore, but rather displays the minimum. I would like the user to be able to see his old value. Is there some setting I don't see in Qt to achieve something like this?
Same question goes for QComboBox.
Upvotes: 1
Views: 1062
Reputation: 350
Another approach is to connect each widget to function that will check if others values are correct (and if not will correct them) :)
Upvotes: 0
Reputation: 2566
As one approach you may create new class, inherited from Qt standart QSpinBox(or in second case from QComboBox) and add your own logic to them: posibility to show value below the minimum, but when someone want explicitly change value in your input widgets, you will check for bounds.
Upvotes: 1