title: Error: Cannot connect (null)::readyRead() to mythread::readyRead()
body: <p>I am writing a multithread server but during the compile in "mythraed" class i get the following errors":
  1) Cannot connect (null)::readyRead() to mythread::readyRead()
  2) Cannot connect (null)::disconnected() to mythread::disconnected()
  How should i fix it?
  here is my code:</p>
  
  <pre><code>void mythread::run()
  {
  
    qDebug() &lt;&lt; " Thread started";
  
  connect(m_client, SIGNAL(readyRead()), this, SLOT(readyRead()), Qt::DirectConnection);
  
  connect(m_client, SIGNAL(disconnected()), this, SLOT(disconnected()));
  
  
     qDebug() &lt;&lt; " Client connected";
  
       exec();
    }
  
  
  void mythread::readyRead()
  
  {
    QByteArray Data = m_client-&gt;readAll();
  
    qDebug()&lt;&lt; " Data in: " &lt;&lt; Data;
  
    m_client-&gt;write(Data);
  }
  
  
  void mythread::disconnected()
  {
    qDebug() &lt;&lt; " Disconnected";
  
    m_client-&gt;deleteLater();
  
    exit(0);
  }
  </code></pre>
  
  <p>myclient:</p>
  
  <pre><code>myclient::myclient(QObject* parent): QObject(parent)
  {
      QObject::connect(&amp;m_client, SIGNAL(connected()),this, SLOT(startTransfer()));
  }
  
  
  void myclient::start(QString address, quint16 port)
    {
  
         QHostAddress LocalHost;
  
          m_client.connectToHost(LocalHost, 6666);
     }
  
  
  void myclient::startTransfer()
  {
  
    m_client.write("Hello", 5);
  }
  </code></pre>