-3

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.

Ram
  • 1

1 Answers1

0

Got the solution!

QRegExp re("[^*]+");
QRegExpValidator *validator = new QRegExpValidator(re, this);

setting this validator to QLineEdit did the job!

Ram
  • 1