//hasAcceptableInput()) //name find.cpp //validate UI #include "find.h" #include "ui_find.h" find::find(QWidget *parent) : QMainWindow(parent), ui(new Ui::find) { ui->setupUi(this); QRegExp regExp("[A-Za-z][1-9][0-9]{0,2}"); ui->lineEdit->setValidator(new QRegExpValidator(regExp,this)); } //I do not know why follow sentense could work on //it neither constructor nor in connect function void find::on_lineEdit_textChanged() { ui->OKButton->setEnabled(ui->lineEdit->hasAcceptableInput()); } find::~find() { delete ui; }
以上就是大力羊最近收集整理的关于hasAcceptableInput()的全部内容,更多相关hasAcceptableInput()内容请搜索靠谱客的其他文章。
发表评论 取消回复