Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ 未定义GUI类型_C++_User Interface - Fatal编程技术网

C++ 未定义GUI类型

C++ 未定义GUI类型,c++,user-interface,C++,User Interface,我有一个很奇怪的问题,我真的想不出来。因此,我在头文件中创建了这个Box对象: #ifndef BOX_H #define BOX_H class Box { public: Box(string newName); ~Box(); //... }; #endif // BOX_H #ifndef BOXTABLE_H #define BOXTABLE_H #include <QTableWidget> #include "box.h

我有一个很奇怪的问题,我真的想不出来。因此,我在头文件中创建了这个Box对象:

#ifndef BOX_H
#define BOX_H

class Box
{
public:
    Box(string newName);
    ~Box();
            //...

};

#endif // BOX_H
#ifndef BOXTABLE_H
#define BOXTABLE_H

#include <QTableWidget>
#include "box.h"

class BoxTable : public QTableWidget
{

Q_OBJECT

public:
    BoxTable(QWidget* parent = 0, int rows = 0);
    ~BoxTable();

    void setBox(int row, Box* a); //here
    //...

};

#endif // BOXTABLE_H
然后我在另一个头文件中有这个BoxTable类:

#ifndef BOX_H
#define BOX_H

class Box
{
public:
    Box(string newName);
    ~Box();
            //...

};

#endif // BOX_H
#ifndef BOXTABLE_H
#define BOXTABLE_H

#include <QTableWidget>
#include "box.h"

class BoxTable : public QTableWidget
{

Q_OBJECT

public:
    BoxTable(QWidget* parent = 0, int rows = 0);
    ~BoxTable();

    void setBox(int row, Box* a); //here
    //...

};

#endif // BOXTABLE_H
对我来说,这一切都是正确的,但当我编译时,我得到了以下错误:

错误:“框”不是类型

在我在这里评论的那条线上

有人知道我做错了什么吗?
我真的很感激你的帮助。如果您需要更多详细信息,请询问。

它不会抱怨上面的那行吗?通过预处理器运行它,看看到底发生了什么。这是一个错误,但它抱怨我现在删除了那行。运行预处理器?这对我来说是新鲜事,我该怎么做?你还在犯错误吗?你能提供你的IDE到底在说什么吗?