【QRegExp】QLineEdit屏蔽空格

QRegExp rx = QRegExp("[40]*");

QRegExpValidator* validator = new QRegExpValidator(rx);

QLineEdit* lineEdit = new QLineEdit();

lineEdit->setValidator(validator);

Hunter药药
原文地址:https://www.cnblogs.com/fengyaoyao/p/11285967.html