I'm using QLineEdit in my application. I want to prevent the user from entering '*' anywhere in the text. I tried to QRegExpValidator but could not able to set the proper regexp. Please help.
Asked
Active
Viewed 166 times
-3
-
5*could not able to set the proper regexp* - What regex did you try? – Wiktor Stribiżew Sep 14 '16 at 12:24
-
Do you have any code to share, with what you did? – Hayt Sep 14 '16 at 12:25
1 Answers
0
Got the solution!
QRegExp re("[^*]+");
QRegExpValidator *validator = new QRegExpValidator(re, this);
setting this validator to QLineEdit did the job!

Ram
- 1