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:
Code:
#include "kentriko.h" #include <iostream> #include <QString> #include "../diafores_sinartisis/sinartisis.h" #include <QMdiArea> using namespace std; { ui.setupUi(this); connect(ui.sindesi, SIGNAL(triggered()), this, SLOT(anixe())); } void kentriko::anixe(){ // setCentralWidget(ui.mdiArea); // para->show(); QMdiSubWindow *subwindow = ui.mdiArea->addSubWindow(¶); subwindow->show(); // invalid use of incomplete type 'struct QMdiSubWindow'?????? //para.show(); }
the header file:
Code:
#ifndef KENTRIKO_H #define KENTRIKO_H #include <QtGui/QMainWindow> #include "ui_kentriko.h" #include "../database/database.h" #include "../kentriko/parathiro/parathiro.h" { Q_OBJECT public: ~kentriko(); private slots: void anixe(); void pare(); void alagi(); private: Ui::kentrikoClass ui; database d; QString proto; QString deytero; QVariant variant; parathiro para; };
the class tha I want to make as a subwindow is the following(parathiro). The header file:
Code:
#ifndef PARATHIRO_H #define PARATHIRO_H #include <QtGui/QMainWindow> #include "ui_parathiro.h" #include "../database/database.h" { Q_OBJECT public: ~parathiro(); private slots: void anixe(); void pare(); void alagi(); private: Ui::parathiroClass ui; database d; QString proto; QString deytero; QVariant variant; }; #endif // PARATHIRO_H
Many thanks in advance