我有一堂课:
class MakeMeshStructure : public QObject
{
Q_OBJECT
public:
MakeMeshStructure(QObject* parent = 0) {}
在其功能之一中,我这样做:
CadPanel * paneli;
int npanelov = mesh.faces_end().handle().idx();
paneli = new CadPanel[npanelov];
后来这个:
for(int i=0; i<npanelov;i++){
if(paneli[i].wasSet)paneli[i].draw(this);
}
这是我的面板类:
class CadPanel : public QObject
{
Q_OBJECT
public:
CadPanel();
void draw(MakeMeshStructure* parent); //error here
错误是:错误 27 错误 C2061:语法错误:标识符“MakeMeshStructure”
如何传递 MakeMeshStructure 父级以在此 CadPanel 函数中使用?泰