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
#ifndef TIMINGSETTINGS_H
#define TIMINGSETTINGS_H
#include <QDialog>
namespace Ui {
class TimingSettings;
}
class TimingSettings
: public QDialog{
Q_OBJECT
public:
explicit TimingSettings
(QWidget *parent
= 0);
~TimingSettings();
void AllowClearTimeChange();
private:
Ui::TimingSettings *ui;
private slots:
void CheckClearTime();
void ChangePurgeTime();
void ChangeReportingTime();
void CheckClearCheckBox();
};
#endif // TIMINGSETTINGS_H
#ifndef TIMINGSETTINGS_H
#define TIMINGSETTINGS_H
#include <QDialog>
namespace Ui {
class TimingSettings;
}
class TimingSettings : public QDialog
{
Q_OBJECT
public:
explicit TimingSettings(QWidget *parent = 0);
~TimingSettings();
void AllowClearTimeChange();
private:
Ui::TimingSettings *ui;
private slots:
void CheckClearTime();
void ChangePurgeTime();
void ChangeReportingTime();
void CheckClearCheckBox();
};
#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):
#ifndef TIMINGSETTINGS_H
#define TIMINGSETTINGS_H
#include <QDialog>
namespace Ui {
class TimingSettings;
}
class TimingSettings
: public QDialog{
Q_OBJECT
public:
explicit TimingSettings
(QWidget *parent
= 0);
~TimingSettings();
void AllowClearTimeChange();
int testVariable;
private:
Ui::TimingSettings *ui;
private slots:
void CheckClearTime();
void ChangePurgeTime();
void ChangeReportingTime();
void CheckClearCheckBox();
};
#endif // TIMINGSETTINGS_H
#ifndef TIMINGSETTINGS_H
#define TIMINGSETTINGS_H
#include <QDialog>
namespace Ui {
class TimingSettings;
}
class TimingSettings : public QDialog
{
Q_OBJECT
public:
explicit TimingSettings(QWidget *parent = 0);
~TimingSettings();
void AllowClearTimeChange();
int testVariable;
private:
Ui::TimingSettings *ui;
private slots:
void CheckClearTime();
void ChangePurgeTime();
void ChangeReportingTime();
void CheckClearCheckBox();
};
#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!
Bookmarks