I have a class with a static variable of type QComboBox *. I have created a static member function from which i want to return this static variable. Here is the sample code:

Header code
Qt Code:
  1. Class TestPage : public QWidget
  2. {
  3. ---
  4. ---
  5. ---
  6. public:
  7. static QComboBox *getTestCombo ();
  8.  
  9. private:
  10. static QComboBox *sm_pTestCombo;
  11. };
To copy to clipboard, switch view to plain text mode 

CPP code
Qt Code:
  1. QComboBox * TestPage::getTestCombo ()
  2. {
  3. return sm_pTestCombo;
  4. }
To copy to clipboard, switch view to plain text mode 


I am getting the following linking error:
undefined reference to 'TestPage::sm_pTestCombo'

Any ideas?