Hi, I have quite large QByteArray and need to split it in smaller (same sized) QByteArrays and possible create QList of these smaller QByteArrays. Let say I have QByteArray with 10 000 bytes and need to split this array to 19 QByteArrays each containing 512 bytes/chars and 1 last QByteArray with remaining bytes...

I have tried memcpy but it did not work for some reason. Can you give me some hint with example how to do it easily? Initial large QByteArray has not fixed size (ie it's size may vary) so number of QByteArrays has to be set dynamicaly. Size of smaller QbyteArrays may be fixed.
Thx