Hi all,

I have created a class called parathiro which is a form. I need to display that form in the mdiArea of my central window (kentriko class). I nearly copied every line of an example taken from the book c++GUI programming with qt.
The problem is that the code below doesnt work althoush i think it should.

the main window where the mdiArea is placed (kentriko class). the implementation:
Qt Code:
  1. #include "kentriko.h"
  2. #include <iostream>
  3. #include <QString>
  4. #include "../diafores_sinartisis/sinartisis.h"
  5. #include <QMdiArea>
  6.  
  7. using namespace std;
  8. kentriko::kentriko(QWidget *parent)
  9. : QMainWindow(parent)
  10. {
  11. ui.setupUi(this);
  12. connect(ui.sindesi, SIGNAL(triggered()), this, SLOT(anixe()));
  13. }
  14. void kentriko::anixe(){
  15. // setCentralWidget(ui.mdiArea);
  16. // para->show();
  17. QMdiSubWindow *subwindow = ui.mdiArea->addSubWindow(&para);
  18. subwindow->show(); // invalid use of incomplete type 'struct QMdiSubWindow'??????
  19. //para.show();
  20. }
To copy to clipboard, switch view to plain text mode 

the header file:

Qt Code:
  1. #ifndef KENTRIKO_H
  2. #define KENTRIKO_H
  3.  
  4. #include <QtGui/QMainWindow>
  5. #include "ui_kentriko.h"
  6. #include "../database/database.h"
  7. #include "../kentriko/parathiro/parathiro.h"
  8.  
  9. class kentriko : public QMainWindow
  10. {
  11. Q_OBJECT
  12. public:
  13. kentriko(QWidget *parent = 0);
  14. ~kentriko();
  15. private slots:
  16. void anixe();
  17. void pare();
  18. void alagi();
  19. private:
  20. Ui::kentrikoClass ui;
  21. database d;
  22. QString proto;
  23. QString deytero;
  24. QVariant variant;
  25. parathiro para;
  26.  
  27. };
To copy to clipboard, switch view to plain text mode 

the class tha I want to make as a subwindow is the following(parathiro). The header file:

Qt Code:
  1. #ifndef PARATHIRO_H
  2. #define PARATHIRO_H
  3.  
  4. #include <QtGui/QMainWindow>
  5. #include "ui_parathiro.h"
  6. #include "../database/database.h"
  7.  
  8. class parathiro : public QMainWindow
  9. {
  10. Q_OBJECT
  11. public:
  12. parathiro(QWidget *parent = 0);
  13. ~parathiro();
  14. private slots:
  15. void anixe();
  16. void pare();
  17. void alagi();
  18. private:
  19. Ui::parathiroClass ui;
  20. database d;
  21. QString proto;
  22. QString deytero;
  23. QVariant variant;
  24. };
  25.  
  26. #endif // PARATHIRO_H
To copy to clipboard, switch view to plain text mode 

Many thanks in advance