i am using pyqt4 to develop a GUI for the first time;
I have a spinbox, and I would like the range of values allowed in it to be dependant on the value another spinbox. for example, the maximum value allowed in the first spinbox should be equal to the value of the second spinbox.
I thought this may be possible using a valueChanged() signal to call a method that is something like:
def function
max = spinbox2.value()
spinbox1.setMaximum(max)
but that didnt work, does anyone know how to do this?
thank you
You have not shown your code where you make the connection between the 'valueChanged' signal of spinbox2 with the
function
. Are you making that connection ?. Also the code you have given forfunction
seems to be incomplete.You can try something like this: