ui->lined->setValidator( validator );. 2.使用QIntValidator 整型數驗證控件控制QLineEdit的輸入范圍(代碼如下):. #include <qvalidator.h>.
確定! 回上一頁