Hello,

I've been reading this example: http://doc.trolltech.com/4.4/mainwin...plication.html.

What if i wanted to use Qt Designer with Qt Creator MainWindow template!

When we go to Project > Qt4 GUI Application > create a MainWindow project we get some thing like this:

main.cpp
Qt Code:
  1. #include <QtGui/QApplication>
  2. #include "mainwindow.h"
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. QApplication a(argc, argv);
  7. MainWindow w;
  8. w.show();
  9. return a.exec();
  10. }
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 <QtGui/QMainWindow>
  5.  
  6. namespace Ui
  7. {
  8. class MainWindowClass;
  9. }
  10.  
  11. class MainWindow : public QMainWindow
  12. {
  13. Q_OBJECT
  14.  
  15. public:
  16. MainWindow(QWidget *parent = 0);
  17. ~MainWindow();
  18.  
  19. private:
  20. Ui::MainWindowClass *ui;
  21. };
  22.  
  23. #endif // MAINWINDOW_H
To copy to clipboard, switch view to plain text mode 
mainwindow.cpp
Qt Code:
  1. #include "mainwindow.h"
  2. #include "ui_mainwindow.h"
  3.  
  4. MainWindow::MainWindow(QWidget *parent)
  5. : QMainWindow(parent), ui(new Ui::MainWindowClass)
  6. {
  7. ui->setupUi(this);
  8. }
  9.  
  10. MainWindow::~MainWindow()
  11. {
  12. delete ui;
  13. }
To copy to clipboard, switch view to plain text mode 

If now i want to reuse the code of the example without the Qt Designer ... where showld i start?!
Guess this is a more complex inheritance scheme ... but i would like to use it.

Thaks for the more patient ones