title: Reading unsingned chars with Qt
body: <p>Hi fellow stack overflowers,</p>
  
  <p>I'm currently parsing a file which both contains text and binary data. Currently, I'm reading the file in following manner:</p>
  
  <pre><code>QTextStream in(&amp;file);
  
  int index = 0;
  while(!in.atEnd()) {
      if (index==0) {
          QString line = in.readLine(); // parse file here
      } else {
          QByteArray raw_data(in.readAll().toAscii());
          data = new QByteArray(raw_data);
      }
      index++;
  }
  </code></pre>
  
  <p>where data refers to the binary data I'm looking for. I'm not sure if this is what I want, since the QString is encoded into ascii and I have no idea if some bytes are lost.</p>
  
  <p>I checked the documentation, and it recommends using a QDataStream. How can I combine both approaches, i.e. read lines with an encoding and also read the binary dump, after one line break?</p>
  
  <p>Help is greatly appreciated!</p>