title: QT signal slot is not working
body: <p>I am facing a strange problem while trying to execute the following program</p>
  
  <p><strong><code>main.cpp</code></strong></p>
  
  <pre><code>#include "sample.h"
  #include &lt;QList&gt;
  #include &lt;unistd.h&gt;
  
  int main(int argc, char **argv)
  {
    A a;
    a.callA();
    while(1)
      sleep(1);
    return 0;
  }
  </code></pre>
  
  <p>sample.cpp</p>
  
  <pre><code>#include "sample.h"
  #include &lt;QList&gt;
  #include &lt;QMetaMethod&gt;
  #include &lt;unistd.h&gt;
  
  
  Thread::Thread(A *a)
  {
  }
  void Thread::run()
  {
    int i = 5;
    while (i){
      qDebug()&lt;&lt; i;
      sleep(2);
      i--;
    }
    emit processingDone("&gt;&gt;&gt; FROM THREAD");
    qDebug()&lt;&lt;"Emited signal from thread";
  }
  
  void A::callA()
  {
    qDebug()&lt;&lt;"from callA";
    //moveToThread(thread);
    thread-&gt;start();
    //thread-&gt;run();
    //emit signalA("&gt;&gt;&gt; FROM CallA");
  }
  
  void A::slotA(QString arg)
  {
    qDebug()&lt;&lt;"from sloatA "&lt;&lt; arg;
  }
  </code></pre>
  
  <p><strong><code>sample.h</code></strong></p>
  
  <pre><code>class A;
      class Thread : public QThread
      {
        Q_OBJECT
      public:
        Thread(A *a);
        ~Thread(){
          qDebug()&lt;&lt;"Thread is destroyed";
        }
        void run();
      signals:
        void processingDone(QString arg);
      };
  
      class A : public QObject{
      Q_OBJECT
  
      public:
        A(){
          qDebug()&lt;&lt;"Registering";
          thread = new Thread(this);
          connect(thread, SIGNAL(processingDone(QString)), this, SLOT(slotA(QString)));
          connect(this,SIGNAL(signalA(QString)), this, SLOT(slotA(QString)));
        }
      public slots:
        void callA();
        void slotA(QString arg);
  
      signals:
        void signalA(QString arg);
  
      private:
        Thread *thread;
      };
  </code></pre>
  
  <p>When I try to executed the program, the slot is not getting invoked?
  if I put moveToThraed(), then the code will work but that won't serve my puprose. Is anything i am missing?</p>