title: how does readyRead() work in Qt?
body: <p>It's my first question on this website !</p>
  
  <p>I have some trouble reading datas from a COM port, I send a complete message from another COM port, and when I receive it with Qt, it's always cut in multiple submessages.</p>
  
  <pre><code>void SerialPortReader::init()
  {
      connect(m_serialPort, SIGNAL(readyRead()), this, SLOT(readData()));
  }   
  
  void SerialPortReader::readData()
  {
  //    m_serialPort-&gt;waitForReadyRead(200);
      QByteArray byteArray = m_serialPort-&gt;readAll();
      qDebug() &lt;&lt; byteArray;
  
      if(byteArray.startsWith(SOF) &amp;&amp; byteArray.endsWith(EOF_LS)
          &amp;&amp; byteArray.size() &gt;= MIN_SIZE_DATA) {
      decodeData(byteArray.constData());
      } else {
          qDebug() &lt;&lt; "LIB SWCom : Unvalid trame !";
      }
  }
  </code></pre>
  
  <p>the messages sent are 25 or 27 Bytes long, if I use Putty or an Hyperterminal to read them, I have no trouble.
  Also if I use 2 emulated serial port COM to communicate, I don't have this problem...
  It only occurs with Qt reading system AND with 2 physical COM port... </p>
  
  <p>I think I don't get when the readyRead signal is emitted exactly...</p>
  
  <p>I'm very confuse, Thank you in advance for your help !</p>