1

程序名称是 GoToCell,我创建了一个标签和两个按钮,我在 main.cpp 中编写了如下代码:

#include <QtGui/QApplication>
#include<QDialog>
#include "ui_GoToCell.h"
#include "GoToCell.h"

int main(int argc, char *argv[]) {
    QApplication a(argc, argv);
    Ui::GoToCell ui;
    QDialog *dialog=new QDialog;
    ui.setupUi(dialog);
    dialog->show();
    return a.exec();
}

运行它时出现以下错误: GoToCell 不是 ui 的成员 我该怎么办?

4

1 回答 1

0

I think you have misspelled object name in objectName property in the GoToCell.ui form. Change it to GoToCell. It will then execute.

于 2012-09-15T10:49:22.080 回答