Problem with QValidator and keyboard
I have a QLineEdit control, and wanna set validator for it.
So, I can't type any alphabet or special character on the lineEdit.
Problem is: I use scim-unikey as my keyboard software. When I change from English keyboard to Vietnamese keyboard, I still type alphabet character (not special character) on the lineEdit.
The character display on the lineEdit but when I focus mouse on another control, ther character disappear (I think this is right because I set QIntValidator for the lineEdit).
I wouldn't like the alphabet character display on the lineEdit. How can I fix this ?
Re: Problem with QValidator and keyboard
Re: Problem with QValidator and keyboard
Quote:
Originally Posted by
sonulohani
use eventfilter instead.
I dont know what you mean. Plz give me an example.
New problem:
Code:
regExpVal->setRegExp (regExp);
ui->lineEditName->setValidator (regExpVal);
ui->lineEditAlias->setValidator (regExpVal);
After do that, I cant type any alphanumeric character on lineEditName and lineEditAlias with Vietnamese keyboard. Qt always clear the character I've input.
How can I fix this ?