title: Unable to connect signal to slot in another class
body: <p>I have 2 classes. Class A and Class B. I am emitting a signal from class A which I want the B to recieve. </p>
  
  <p>I am doing it following way</p>
  
  <p>In Listener File</p>
  
  <pre><code>Header File:
    Class Listener:public DDSDataReaderListener
    {
       //Some code
      public:
         A m_objectSendData;
    }
  </code></pre>
  
  <p>Implementation File:</p>
  
  <pre><code>  void Listener::ondataavailable(DDSDataReader *reader)
   {
    m_objSendData.GetDDSData();
   }
  </code></pre>
  
  <p>In Class A</p>
  
  <p>Header File:</p>
  
  <pre><code>Class A:public QObject
  {
    Q_OBJECT
    public:
      void GetDDSData();
    signals:
      void Signal_Data();
  }
  </code></pre>
  
  <p>.cpp File</p>
  
  <pre><code> A::A(QWidget *parent):QObject(parent)
  {
  }
  
  void A::GetDDSData()
   {
     emit Signal_Data();
   }   
  </code></pre>
  
  <p>In Class B</p>
  
  <pre><code>Header File:
  
    Class B:public QObject
    {
      Q_Object
      public:
      A objGetData;
  
      public slots:
      void getData();
    }
  
  Implementation File:
  
   B::B(QWidget *parent):QObject(parent)
  {
     //Some part of code
  
    connect(&amp;objGetData,SIGNAL(Signal_Data()),this,SLOT(getData());
   }
  
   void B::getData()
   {
      //Watever is to be updated
    }
  </code></pre>
  
  <p>I tried debugging. It is going till emit part correctly. However it is not reaching the slot.
  Can someone please help me with this.
  Thank You.</p>