【QRegExp】QLineEdit屏蔽空格

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

QRegExpValidator* validator = new QRegExpValidator(rx);

QLineEdit* lineEdit = new QLineEdit();

lineEdit->setValidator(validator);

posted @ 2019-08-01 23:07  冯耀耀  阅读(1605)  评论(0编辑  收藏  举报