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