9.正则表达式

1 //可以写任何复杂正则表达式
2     QRegExp reg("[A-Z]");
3     ui->lineEdit->setValidator(new QRegExpValidator(reg,this));
原文地址:https://www.cnblogs.com/xiaochi/p/8744770.html