leTime ); ui->leTime->setValidator( validator );" />

QT LineEdit控件数字正则判断

QRegExp regx("[0-9]+$");

QValidator *validator = new QRegExpValidator(regx, ui->leTime );

ui->leTime->setValidator( validator );

分享

34.204.191.31