title: How to use static variable in qt?
body: <p>How can use static variable in qt?</p>
  
  <p>I tried:</p>
  
  <pre><code>#ifndef TEST_H
  #define TEST_H
  
  #include &lt;QObject&gt;
  
  class Test : public QObject
  {
      Q_OBJECT
  public:
      explicit Test(QObject *parent = 0);
      static int a;
  signals:
  
  public slots:
  };
  
  #endif // TEST_H
  </code></pre>
  
  <p>but I can't read the data.</p>
  
  <pre><code>int b = Test::a;
  </code></pre>