Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.7.0
-
Windows
-
1e85ca2e62e9aba553a53effabf52272aa3acb70 (qtbase/5.6, 25.8.2016, 5.6.2)
Description
When using QSpinBox and calling clear on it, manually inputting a value less than minimum does not default to the pre-set minimum value until a proper value has been set once.
Steps to reproduce:
- Run attached sample
- Notice that range of 6...100 has been set for the QSpinBox, and clear has been called
- Insert number 5 to the QSpinBox and press Enter
- EXPECTED: Number 6 is inserted to the QSpinBox
- ACTUAL: Number 5 stays in the QSpinBox
Way to avoid this behaviour:
- Run attached sample
- Insert number 7, press Enter
- Observe that 7 is set properly
- Change the 7 to 5, press Enter
- Number is properly changed to 6
Also, if user enters too small number, and clicks the spinbox up/down controls, the minimum value is properly enforced. This behaviour requires that the clear() is called for the QSpinBox and the number is entered manually, it is not reproducible otherwise. Probably the cleared flag is causing some problem here.
Attachments
Issue Links
- relates to
-
QTBUG-47285 QSpinBox: clearing the value and pressing Enter should mean 0, not revert
- Reported