Why this code not work:
Code:
qv->setDecimals(2); editor->setValidator(qv);
The number takes all decimals, not only 2
Printable View
Why this code not work:
Code:
qv->setDecimals(2); editor->setValidator(qv);
The number takes all decimals, not only 2
Use a reg exp validator with a regexp set to "\d*\.\d{1,2}" instead if you want to disallow the scientific notation. Remember about escaping backslashes.