Help, I'm lost. I created a main window in the designer and saved it and now I'm trying to use it.

main.cpp
Qt Code:
  1. #include <QApplication>
  2. #include "MainWindow.h"
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication app(argc, argv);
  7.  
  8. MainWindow *mainW = new MainWindow();
  9. mainW->show();
  10.  
  11. return app.exec();
  12. }
To copy to clipboard, switch view to plain text mode 

MainWindow.h
Qt Code:
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3.  
  4. #include <QDialog>
  5. #include <ui_MainWindow.h>
  6.  
  7. class MainWindow : public QDialog, public Ui::MainWindow
  8. {
  9. Q_OBJECT
  10.  
  11. public:
  12. MainWindow(QWidget *parent = 0);
  13. }
To copy to clipboard, switch view to plain text mode 

MainWindow.cpp
Qt Code:
  1. #include "MainWindow.h"
  2.  
  3. MainWindow::MainWindow(QWidget *parent )
  4. : QDialog(parent)
  5. {
  6. setupUi(this);
  7. }
To copy to clipboard, switch view to plain text mode 

The error that I get is:
MainWindow.cpp: In constructor 'MainWindow::MainWindow(QWidget*)':
MainWindow.cpp:26: error: no matching function for call to 'MainWindow::setupUi(MainWindow* const)'
Ui/ui_MainWindow.h:52: note: candidates are: void Ui_MainWindow::setupUi(QMainWindow*)

So I know my problem is the "setupUi(this);" What the hell does it want? I'm lost.

Thanks,
Paul