"Field has incomplete type"
<p>There is an error in my header file: "field "ui" has incomplete type."</p>

<p>I have tried making ui a pointer, but that doesn't work; I don't think I need to do that because I have already defined my <code>MainWindowClass</code> in the namespace Ui. I don't know what else I can tell you. This is my mainwindow.h.</p>

<pre><code>#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include &lt;QtGui/QMainWindow&gt;
#include "ui_mainwindow.h"

namespace Ui {
class MainWindowClass;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0, Qt::WFlags flags=0);
    ~MainWindow();

public slots:
    void slideValue(int);
private:
    Ui::MainWindowClass ui; //error line
};

#endif // MAINWINDOW_H
</code></pre>
