title: Printing qByteArray through qDebug
body: <pre><code>#include &lt;QCoreApplication&gt;
  #include &lt;QByteArray&gt;
  #include &lt;QDebug&gt;
  
  int main(int argc, char *argv[])
  {
      QCoreApplication a(argc, argv);
  
      QByteArray dataReceivedFromSerialPort;
  
      dataReceivedFromSerialPort.push_back(0x0A);
      dataReceivedFromSerialPort.push_back(0x0B);
      dataReceivedFromSerialPort.push_back(0x0C);
      dataReceivedFromSerialPort.push_back(0x0D);
      dataReceivedFromSerialPort.push_back(0x0E);
      dataReceivedFromSerialPort.push_back(0x0F);
      dataReceivedFromSerialPort.push_back(0x07);
      dataReceivedFromSerialPort.push_back(0x02);
      dataReceivedFromSerialPort.push_back(0x01);
      dataReceivedFromSerialPort.push_back(0x02);
  
      qDebug() &lt;&lt; "tostr: " &lt;&lt; dataReceivedFromSerialPort.toStdString().c_str();
  
  
      return a.exec();
  }
  </code></pre>
  
  <p>The above does not print any value. It doesn't print anything beyond "tostr: ". If I store 0x0A in uchar and then push it in qByteArray then this problem disappears.</p>
  
  <p>What can I do print it in its current form?</p>