QPushButton的setEnabledI()怎么不起作用?哪里出问题了?
#include "gotocell.h"#include "ui_gotocell.h"GoToCell::GoToCell(QWidget *parent) : QWidget(parent),Ui_GoToCell(), ui(new Ui::GoToCell){ ui->setupUi(this); lineEdit = new QLineEdit(); butOk = new QPushButton(); QRegExp regExp("[A-Za-z][1-9][0-9]{0,2}"); lineEdit -> setValidator(new QRegExpValidator(regExp,this));}GoToCell::~GoToCell(){ delete ui;}void GoToCell::on_lineEdit_textChanged(){ butOk -> setEnabled(lineEdit -> hasAcceptableInput()); //butOk -> setEnabled(true);}