Use QByteArray::append instead of copying every byte with [] operator.