Hello
I have finished a qt tutorial from another site. Everything runs fine except the GUI i made in QT Designer does not show up. All tutorials I can find on the subject implements it the same way.

So to summon it up. I only get a blank window when I run my project.

Main.cpp
Qt Code:
  1. #include <QtCore/QCoreApplication>
  2. #include "TempForm.h"
  3. #include "Window.h"
  4.  
  5. int main(int argc, char *argv[])
  6. {
  7. QApplication a(argc, argv);
  8.  
  9. Window mWindow;
  10. mWindow.resize(800,600);
  11. mWindow.show();
  12.  
  13. return a.exec();
  14. }
  15. #endif
To copy to clipboard, switch view to plain text mode 

Window.h
Qt Code:
  1. #ifndef WINDOW_H
  2. #define WINDOW_H
  3.  
  4. #include <QtOpenGl/QGLWidget>
  5. #include <QtGui>
  6. #include "TempForm.h"
  7.  
  8. class Window : public QWidget , private Ui::MainWindow //MainWindow is the class name from QT Designer header file (TempForm.h)
  9. {
  10. public:
  11. Window(QWidget *parent = 0);
  12. ~Window();
  13. };
  14. #endif
To copy to clipboard, switch view to plain text mode 

Window.cpp
Qt Code:
  1. #include <QtGui/QMouseEvent>
  2. #include "Window.h"
  3.  
  4. Window::Window(QWidget *parent)
  5. {
  6. setupUi(&(QMainWindow)this); // this sets up GUI
  7. }
  8. Window::~Window()
  9. {
  10.  
  11. }
To copy to clipboard, switch view to plain text mode 

If I manually call each guielemts show function my application crash.

Any suggestions?