GoToCellDialog::GoToCellDialog(QDialog *parent) :
QDialog(parent),
ui(new Ui::GoToCellDialog)
{
ui->setupUi(this);
QRegExp regExp("[A-Za-z] [1-9] {0 ,2}");
ui->lineEdit->setValidator(new QRegExpValidator(regExp , this));
connect(ui->okButton , SIGNAL(clicked()),this , SLOT(accept()));
connect(ui->cancelButton, SIGNAL(clicked()), this , SLOT(reject()));
}
void GoToCellDialog ::on_lineEdit_textChanged()
{
ui->okButton->setEnabled(ui->lineEdit->hasAcceptableInput());
}
lineEdit对话框有光标,但不能输入怎么回事?
求高手指教。