title: Convert unsigned char[10] to QBytearray;
body: <p>I've seen a lot o questions around this, but so far none worked for me.</p>
  
  <p>I've tried the 2 most common answers but I get the same error.</p>
  
  <p>being but an <code>unsigned char buf[10];</code></p>
  
  <p>this,</p>
  
  <pre><code>QByteArray databuf;
  databuf = QByteArray::fromRawData(buf, 10); 
  </code></pre>
  
  <p>or this,</p>
  
  <pre><code>QByteArray databuf;
  databuf = QByteArray(buf, 10);
  </code></pre>
  
  <p>got me the same error,</p>
  
  <p><code>error: invalid conversion from 'unsigned char*' to 'const char*' [-fpermissive]</code></p>
  
  <p>any advice?</p>
  
  <p>thank you</p>