В следующем коде из Программирование на C ++ GUI с использованием Qt 4 , где происходит вызов функции on_lineEdit_textchanged()
, поскольку это явно не показано в коде?
#include <QtGui>
#include "gotocelldialog.h"
GoToCellDialog::GoToCellDialog(QWidget *parent): QDialog(parent)
{
setupUi(this);
QRegExp regExp("[A-Za-z][1-9][0-9]{0,2}");
QValidator *validator = new QRegExpValidator(regExp, this);
lineEdit->setValidator(validator);
connect(okButton, SIGNAL(clicked()),this, SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
}
void GoToCellDialog::on_lineEdit_textChanged()
{
okButton->setEnabled(lineEdit->hasAcceptableInput());
}
Спасибо.