title: QByteArray convert to/from unsigned char *
body: <pre><code>QByteArray inArray = " ... ";
  unsigned char *in = convert1(inArray);
  unsigned char *out;
  someFunction(in, out);
  QByteArray outArray = convert2(out);
  </code></pre>
  
  <p>the question is how can I correctly make these conversions (convert1 and convert2). 
  I cannot change someFunction(unsigned char *, unsigned char *), but I have to work with QByteArray here.</p>