Pyqt Qspinbox Update Range Depending On The Value Of Other Spinbox
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 exampl
Solution 1:
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 for function
seems to be incomplete.
You can try something like this:
spinbbox2.valueChanged.connect(handler)
# Or this which works for Python 3.5
spinbbox2.valueChanged[int].connect(handler)
# The function handler called is called whenever# value in spinbox2 is changed and parameter to# handler is the new value of spinbox2defhandler(value):
spinbox1.setMaximum(value)
Post a Comment for "Pyqt Qspinbox Update Range Depending On The Value Of Other Spinbox"