Here is what you have shown. I'll add comments and the changes and then see what, if any, difference that it makes.
#ifdef MAINWINDOW_H
#undef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QPropertyAnimation>
#include <QMessageBox>
#include <QGraphicsOpacityEffect>
#include <NewForm.h>
#include <QFormLayout>
#include <QSequentialAnimationGroup>
namespace Ui {class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
Below is my modified version of what I think may be your issues.
#if !defined(MAINWINDOW_H__F188ACDC_1956_4C5B_9A04_CBFEBD566608__INCLUDED_)
#define MAINWINDOW_H__F188ACDC_1956_4C5B_9A04_CBFEBD566608__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#define Q_OBJECT
#include <qmainwindow.h>
#include <QPropertyAnimation.h>
#include <QMessageBox.h>
#include <QGraphicsOpacityEffect.h>
#include <NewForm.h>
#include <QFormLayout.h>
#include <QSequentialAnimationGroup.h>
namespace Ui
{
class CMainWindow : public QMainWindow
{
Q_OBJECT = NULL;
public:
explicit CMainWindow(QWidget *parent = 0);
~CMainWindow();
private:
Ui::CMainWindow *ui;
}
CMainWindow* mw;
}
#endif // MAINWINDOW_H
</qmainwindow.h>