How to set up possible min and max float values with QDoubleValidator
-
hello,
i was reading the documentation for QDoubleValidator https://doc.qt.io/qtforpython-5/PySide2/QtGui/QDoubleValidator.html#PySide2.QtGui.PySide2.QtGui.QDoubleValidator
and If i understand it correctly, I can set a lower and upper boundaries. but this seems to not work or at least it is not giving the attended result, what I am missing?inputs_0=[QLineEdit('1.0')] inputs_0[0].setValidator(QtGui.QDoubleValidator(0.0, min(minimimPossibleValues), 8))
I am looking for limit the input values to 0.0 and 0.0045529305934905034 (which is min(minimimPossibleValues)) how can succesfully do this?
-
hello,
i was reading the documentation for QDoubleValidator https://doc.qt.io/qtforpython-5/PySide2/QtGui/QDoubleValidator.html#PySide2.QtGui.PySide2.QtGui.QDoubleValidator
and If i understand it correctly, I can set a lower and upper boundaries. but this seems to not work or at least it is not giving the attended result, what I am missing?inputs_0=[QLineEdit('1.0')] inputs_0[0].setValidator(QtGui.QDoubleValidator(0.0, min(minimimPossibleValues), 8))
I am looking for limit the input values to 0.0 and 0.0045529305934905034 (which is min(minimimPossibleValues)) how can succesfully do this?
Hi,
Why not use a QDoubleSpinBox directly ?
-
Hi,
Why not use a QDoubleSpinBox directly ?
-
@SGaist didnt now it, is it possible to hide the arrows by any chance? found it from the QT designer! thanks again
If memory serves well, you can use the buttonSymbols property for that.