Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.8.6, 5.1.1, 5.2.0 Alpha, 5.2.0 Beta1
-
None
-
Mac 10.8.5 or Win7
-
dc80838a378268a13ccbe74b481528f1ad631918 qt4: efce5d8361af41bf60dd16ce5aec65fe2fd84f88
Description
Setting a QIntValidator on a QLineEdit fails to accept negative values entered when the locale is sv_SE. The following code should allow numbers from -9 to 9 in the LineEdit, but Qt blocks the minus sign when the locale is Swedish.
QLineEdit* leSE = new QLineEdit();
QLocale locSE("sv_SE");
QIntValidator* pValidator = new QIntValidator(-9, 9, leSE);
pValidator->setLocale(locSE);
leSE->setValidator(pValidator);
This same method works well in many other locales, including similar Scandinavian languages such an Finnish.
Attachments
Issue Links
- is duplicated by
-
QTBUG-40235 Can't enter negative values in to SpinBox
- Closed