title: Storing binary data in a PNG file using QImage::setText()
body: <p>I need to read/store binary data in the metadata of a PNG image. Specifically, it will be gzipped data which has been serialized by Google's protobuf library.</p>
  
  <p>I'm using the <code>QImage</code> library of Qt5 to load and store the images, so it would be extremely convenient if I could find a way to use some Qt library to add this binary data to the <code>QImage</code> I'm already using.</p>
  
  <p>I see that the <code>QImage</code> class has a <a href="http://qt-project.org/doc/qt-5/qimage.html#setText" rel="nofollow" title="setText method"><code>setText</code> method</a> which appears to do exactly what I want, except for one caveat: It takes a <code>QString</code> as an argument and not a <code>QByteArray</code>, and the <code>QString</code> constructor mangles my binary data.</p>
  
  <p>How can I force <code>QString</code> to preserve my binary data, both when storing and loading? If that's not possible, is there some other way in Qt5 to add metadata to a PNG image?</p>