Hey guys,

I was wondering what might be causing this error I'm having - basically when I put any kind of variable in my class header file it crashes the program when I exit..

Example:
My current header file contains
Qt Code:
  1. #ifndef TIMINGSETTINGS_H
  2. #define TIMINGSETTINGS_H
  3.  
  4. #include <QDialog>
  5.  
  6. namespace Ui {
  7. class TimingSettings;
  8. }
  9.  
  10. class TimingSettings : public QDialog
  11. {
  12. Q_OBJECT
  13.  
  14. public:
  15. explicit TimingSettings(QWidget *parent = 0);
  16. ~TimingSettings();
  17. void AllowClearTimeChange();
  18.  
  19. private:
  20. Ui::TimingSettings *ui;
  21.  
  22. private slots:
  23. void CheckClearTime();
  24. void ChangePurgeTime();
  25. void ChangeReportingTime();
  26. void CheckClearCheckBox();
  27. };
  28.  
  29. #endif // TIMINGSETTINGS_H
To copy to clipboard, switch view to plain text mode 

----------
It blows up on exiting if I change it like the following (adding the int testVariable):
Qt Code:
  1. #ifndef TIMINGSETTINGS_H
  2. #define TIMINGSETTINGS_H
  3.  
  4. #include <QDialog>
  5.  
  6. namespace Ui {
  7. class TimingSettings;
  8. }
  9.  
  10. class TimingSettings : public QDialog
  11. {
  12. Q_OBJECT
  13.  
  14. public:
  15. explicit TimingSettings(QWidget *parent = 0);
  16. ~TimingSettings();
  17. void AllowClearTimeChange();
  18. int testVariable;
  19.  
  20. private:
  21. Ui::TimingSettings *ui;
  22.  
  23. private slots:
  24. void CheckClearTime();
  25. void ChangePurgeTime();
  26. void ChangeReportingTime();
  27. void CheckClearCheckBox();
  28. };
  29.  
  30. #endif // TIMINGSETTINGS_H
To copy to clipboard, switch view to plain text mode 

Any tips on what might be causing this? I don't do anything with the variable - just the declaration alone causes the crashing..

Thanks in advance!