#include"gotocelldialog.h"
GoToCellDialog::GoToCellDialog(QWidget* parent):QDialog(parent)
{
//this->setObjectName(QString::fromUtf8("this"));
this->resize(QSize(335, 78).expandedTo(this->minimumSizeHint()));
gridLayout = new QGridLayout(this);
gridLayout->setSpacing(6);
gridLayout->setMargin(9);
// gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
hboxLayout = new QHBoxLayout();
hboxLayout->setSpacing(6);
hboxLayout->setMargin(0);
//hboxLayout->setObjectName(QString::fromUtf8("hboxLayout"));
label = new QLabel(tr("&Cell Location:"),this);
//label->setObjectName(QString::fromUtf8("label"));
hboxLayout->addWidget(label);
lineEdit = new QLineEdit(this);
//lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
hboxLayout->addWidget(lineEdit);
gridLayout->addLayout(hboxLayout, 0, 0, 1, 1);
hboxLayout1 = new QHBoxLayout();
hboxLayout1->setSpacing(6);
hboxLayout1->setMargin(0);
//hboxLayout1->setObjectName(QString::fromUtf8("hboxLayout1"));
spacerItem = new QSpacerItem(121, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
hboxLayout1->addItem(spacerItem);
okButton = new QPushButton(tr("OK"),this);
//okButton->setObjectName(QString::fromUtf8("okButton"));
okButton->setEnabled(false);
okButton->setDefault(true);
hboxLayout1->addWidget(okButton);
cancelButton = new QPushButton(tr("Cancel"),this);
//cancelButton->setObjectName(QString::fromUtf8("cancelButton"));
hboxLayout1->addWidget(cancelButton);
gridLayout->addLayout(hboxLayout1, 1, 0, 1, 1);
label->setBuddy(lineEdit);
QWidget::setTabOrder(lineEdit, okButton);
QWidget::setTabOrder(okButton, cancelButton);
//retranslateUi(this);
connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
connect(lineEdit ,SIGNAL(textChanged(const QString&)),this,SLOT(enableOkButton()));
setWindowTitle(tr("GO TO CELL"));
}
void GoToCellDialog::enableOkButton()
{
okButton ->setEnabled(lineEdit->hasAcceptableInput());
}
================================================
gotocelldialog.cpp:3: error: new types may not be defined in a return type
gotocelldialog.cpp:3: error: return type specification for constructor invalid
make[1]: *** [debug\gotocelldialog.o] Error 1
make[1]: Leaving directory `C:/Documents and Settings/chenxiaobo/桌面/gotocelldi
alog'
make: *** [debug] Error 2