I am getting a mysterious error trying to subclass QTreeWidget. Below is code from the relevant files. In QtDesigner, I have promoted a QTreeWidget to a treeWidget, but I get the following error:
Error 1 error C2061: syntax error : identifier 'treeWidget' Visual Studio 2010\Projects\hw2\QTOpenGL\GeneratedFiles\ui_opengldemo.h 72 1 QTOpenGL
I have been told not to edit code in the ui_ files, so I'm assuming this problem can be solved without going in there. Any ideas? Does the code below give enough information to solve this issue? Thanks.
**treeWidget.h:**
#ifndef TREEWIDGET
#define TREEWIDGET
#include <QTreeWidget>
#include "gNode.h"
class treeWidget :
public QTreeWidget
{
Q_OBJECT
public:
treeWidget(QWidget*);
~treeWidget(void);
public slots:
void topLevelItem(gNode* node);
};
#endif
**treeWidget.cpp**
#include "treeWidget.h"
treeWidget::treeWidget(QWidget* parent) : QTreeWidget(parent)
{
}
treeWidget::~treeWidget(void)
{
}
void treeWidget::topLevelItem(gNode* node){
addTopLevelItem(node);
}