hi,

idk if somebody has tried this before, but I had first time opportunity to use Qworkspace API in my program and the compiler is throwing out this puzzling error each time::
error:invalid use of undefined type 'struct QWorkspace'

I've included the required QWorkspace header file properly in my header file, but still I'm getting this error, code snippets are as follows:
Header file snippet is::

Qt Code:
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3.  
  4. #include <QMainWindow>
  5.  
  6. class QWorkspace;
  7.  
  8. class MainWindow : public QMainWindow
  9. {
  10. Q_OBJECT
  11. public:
  12. MainWindow();
  13. private:
  14. QWorkspace *workspace;
  15.  
  16. };
  17. #endif
To copy to clipboard, switch view to plain text mode 

CPP file snippet is ::

Qt Code:
  1. #include <QtGui>
  2.  
  3. #include "test.h"
  4.  
  5. MainWindow::MainWindow()
  6. {
  7. workspace = new QWorkspace;
  8. setCentralWidget(workspace);
  9.  
  10. /*some stupid code of application*/
  11.  
  12. }
To copy to clipboard, switch view to plain text mode 

is there anything I'm missing out in that?



Thanks