I end up with 2 different behaviors of the same code when launching on Spyder (Python 3.9.7) and on the Terminal (Mac OS) (Python 3.10.1)
The issue relates to the validation of input in a field within a GUI.
In both cases (Spyder and Terminal), QIntValidator does block typing string or float as expected. But it does not limit the value according to the expected behavior.
Here are the experts of my code related to the field and the data validator:
validatorDim = QIntValidator(1, 25, self)
self.longueurEdit = QLineEdit(self)
self.longueurEdit.setValidator(validatorDim)
The behavior in Spyder: I cannot type any value above 25 (expected behavior). The issue in Terminal: I can type values up to 99.
Any idea on how to solve this?