title: How to read 16 bit integer using QByteArray
body: <p>I want to read a file with QByteArray but the problem is that it read byte wise and i want array of 16 bit integer. here is my code... </p>
  
  <pre><code> QByteArray fileBuf;
   sprintf_s(filepath, "c:/file.bin");}
   myfile.setFileName(filepath);
   if(!myfile.open(QIODevice::ReadOnly)) return;
   fileBuf=myfile.readAll();
  </code></pre>
  
  <p>here is the test to find values inside</p>
  
  <pre><code> qint16 z;
   for(int test =0; test &lt; 5 ; test++)
   {
    z= (fileBuf[i]);
   qDebug()&lt;&lt; i&lt;&lt;"is="&lt;&lt;z;
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>0 is= -88 (// in binary// 1111 1111 1010 1000)
  1 is= -2   (// in binary// 1111 1111 1111 1110)
  2 is= -64 
  3 is= -3 
  4 is= 52
  </code></pre>
  
  <p>these are because of 8 bit array i need 16 bit i,e.. at  value at 0 = -344 (//binary// 1111 11110 1010 1000)</p>