QBuffer from void pointer and memory size
<p>I'm looking for the most simple and or elegant way to create a QBuffer in C++ Qt5.6 from <code>void * data</code> and <code>long data_size</code>.</p>

<p>I tried casting the void to a char pointer and using the <code>QByteArray::fromRawData()</code> as well as using <code>QDataStream</code> to fill a <code>QByteArray</code>. In both cases I didn't succeed.</p>