About qdoublevalidation

  • Hey guys , I've been searching for a solution:

    lineedit.>setValidator(new QDoubleValidator(0.00,100.00,2,this));

    it works " this is an example " but I still can insert values greater than 100!!

    I searched and found this won't limit the line edit ,because the user can still enter a " . " to set the value , so what can I do to change this the user can only insert values between 0.0 to 100.0 ?

  • Tried this:


    VALID_DOUBLE = new QDoubleValidator;


    it doesn't really lets the max limit 100 or under but still better since you can't really go above 999 which is nice

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.