I have a QLineEdit
and I am using it for a measurement conversion application. In that QLineEdit
I have to use only integer values, so I used the QDoubleValidator
.
q_LineEdit->setValidator(new QDoubleValidator(this));
Now I want the QLineEdit
to accept only " and / characters to it, as well as the integers, as it is required for the conversion application. How can I make my QLineEdit
accept it while using a QDoubleValidator
?
Note: I want my QLineEdit
to accept something like this (eg. 70“1/2).
Note: The QLineEdit
should not accept any other characters other than " and /.