I am trying to use 'QCloseEvent', but get this error:
Qt Code:
  1. board.cpp:180: error: invalid use of incomplete type ‘struct QCloseEvent’
  2. /usr/include/qt4/QtGui/qwidget.h:83: error: forward declaration of ‘struct QCloseEvent’
To copy to clipboard, switch view to plain text mode 

This is the code I am using ( in board.cpp):
Qt Code:
  1. void Board::closeEvent(QCloseEvent *event){
  2. //some code
  3. event->accept();
  4. //some more code
  5. }
To copy to clipboard, switch view to plain text mode 

in board.h I have:
Qt Code:
  1. protected:
  2. void closeEvent(QCloseEvent *event);
To copy to clipboard, switch view to plain text mode 

Does anyone know what I have done wrong?

Any help is appreciated.