QT 禁止QLineEdit输入空格、空值
QRegExp rx("[^\\s]+$");
QRegExpValidator *validator = new QRegExpValidator(rx, this);
ui->lineedit->setValidator(validator);
正则表达式参考链接:https://blog.csdn.net/Hyc_cheng/article/details/112132963
QRegExp rx("[^\\s]+$");
QRegExpValidator *validator = new QRegExpValidator(rx, this);
ui->lineedit->setValidator(validator);
正则表达式参考链接:https://blog.csdn.net/Hyc_cheng/article/details/112132963