This should go into a .cpp file, and in the header file just the extern declaration
Qt Code:
  1. namespace myn
  2. {
  3. int x = 1;
  4. }
To copy to clipboard, switch view to plain text mode