I am trying to use 'QCloseEvent', but get this error:
board.
cpp:180: error
: invalid use of incomplete type ‘
struct QCloseEvent’
/usr
/include
/qt4
/QtGui
/qwidget.
h:83: error
: forward declaration of ‘
struct QCloseEvent’
board.cpp:180: error: invalid use of incomplete type ‘struct QCloseEvent’
/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):
//some code
event->accept();
//some more code
}
void Board::closeEvent(QCloseEvent *event){
//some code
event->accept();
//some more code
}
To copy to clipboard, switch view to plain text mode
in board.h I have:
protected:
protected:
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.
Bookmarks