CloseEvent gives invalid use or incomplete 'struct QCloseEvent'
-
Hello,
I am trying to override CloseEvent but i am getting the following error
invalid use of incomplete type 'struct QCloseEvent'
forward declaration of 'struct QCloseEvent'Here is my code:
fullscreendial.h
@#ifndef FULLSCREENDIAL_H
#define FULLSCREENDIAL_H#include <QDialog>
namespace Ui {
class fullScreenDial;
}class fullScreenDial : public QDialog
{
Q_OBJECTpublic:
explicit fullScreenDial(QWidget *parent = 0);
~fullScreenDial();private:
Ui::fullScreenDial *ui;protected:
void closeEvent(QCloseEvent *);
void reject();
};#endif // FULLSCREENDIAL_H
@fullscreendial.cpp
@#include "fullscreendial.h"
#include "ui_fullscreendial.h"fullScreenDial::fullScreenDial(QWidget *parent) :
QDialog(parent),
ui(new Ui::fullScreenDial)
{
ui->setupUi(this);// int x=1;
}fullScreenDial::~fullScreenDial()
{
delete ui;
}void fullScreenDial::closeEvent( QCloseEvent * event) {
event->ignore(); }void fullScreenDial::reject()
{
}
@Can you please let me know what I am doing wrong ?
Many thanks