Hello to everyone,
I have a simple qdialog, which contains a QLineEdit (txtValue).
In my dialog's constructor, i do as follows:
pValidator->setRange(0, 1000, 1);
txtValue->setValidator(pValidator);
QDoubleValidator* pValidator = new QDoubleValidator(0, 1000, 1, txtValue);
pValidator->setRange(0, 1000, 1);
txtValue->setValidator(pValidator);
To copy to clipboard, switch view to plain text mode
My problem is, i'm still able to enter values like "9999999", also if a "setText" is done from "outside" (Like this txtValue->setText(QString::number(dNewValue)), there are too many decimal displayed (I want only 1 number after comma).
What am i doing wrong here?
Thank you,
Pierre.
Bookmarks