【发布时间】:2012-08-07 10:22:08
【问题描述】:
我有一个 QLineEdit 控件,并想为它设置验证器。
QRegExp regExp("[A-Za-z0-9]+");
QRegExpValidator *regExpVal = new QRegExpValidator();
regExpVal->setRegExp (regExp);
ui->lineEditName->setValidator (regExpVal);
之后,我无法使用越南语键盘在 lineEditName 和 lineEditAlias 上键入任何字母数字字符。 Qt 总是清除我输入的字符。 我该如何解决这个问题?
【问题讨论】: