I am trying to create a class in Qt within the Ui namespace. In my name space I already have 2 classes made with Qt Designer, and using it as reference did not help me solve my problem.
In myclass.h I put
namespace Ui {class MyClass};
class MyClass : public QObject
{Q_OBJECT
private:
    Ui::MyClass* ui;
//body
}
And in myclass.cpp I put
MyClass::MyClass(QObject *parent) :QObject(parent),ui (new Ui::MyClass) 
//Here I have : allocation of incomplete type 'Ui::MyClass' 
{
    ui->setupUi(this);       
//Here I have : member access into incomplete type Ui::MyClass'
}
I saw way of defining class in a namespace but I did not find a way to solve my error here.
 
    