天天看點

Qt開發:QLineEdit 隻能輸入數字

QRegExp regx("[0-9]+$");      
QValidator *validator = new QRegExpValidator(regx, ui->leTime );      
ui->leTime->setValidator( validator );      

繼續閱讀