1
我有一个QLineEdit控件,并且想为它设置验证器。QValidator和键盘语言qt
QRegExp regExp("[A-Za-z0-9]+");
QRegExpValidator *regExpVal = new QRegExpValidator();
regExpVal->setRegExp (regExp);
ui->lineEditName->setValidator (regExpVal);
之后,我不能在lineEditName和lineEditAlias上用越南语键盘输入任何字母数字字符。 Qt总是清除我输入的字符。 我该如何解决这个问题?