Why this code not work:
Qt Code:
qv->setDecimals(2); editor->setValidator(qv);To copy to clipboard, switch view to plain text mode
The number takes all decimals, not only 2
Why this code not work:
Qt Code:
qv->setDecimals(2); editor->setValidator(qv);To copy to clipboard, switch view to plain text mode
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.
Bookmarks