This may be the stupidest question ever asked on this forum but I have the following code.

#Header File
Qt Code:
  1. #ifndef GSETTINGS_H
  2. #define GSETTINGS_H
  3.  
  4. #include <QObject>
  5. #include <QSettings>
  6. #include <QString>
  7. #include <QPointer>
  8.  
  9. class gSettings : public QObject
  10. {
  11. private:
  12. public:
  13. gSettings();
  14. static bool OpenSettings(QString filename);
  15. static int i;
  16. };
  17.  
  18. #endif // GSETTINGS_H
To copy to clipboard, switch view to plain text mode 

# here is the implementation
Qt Code:
  1. #include "gsettings.h"
  2. #include <QSettings>
  3.  
  4. gSettings::gSettings()
  5. {
  6. }
  7.  
  8. bool gSettings::OpenSettings(QString filename)
  9. {
  10. i = 12;
  11. return true;
  12. }
To copy to clipboard, switch view to plain text mode 

And I get the following error on the line "i=12"

/home/weavert/Development/QT-Projects/Settings/Settings/gsettings.cpp:10: undefined reference to `gSettings::i'

What am I doing wrong.?