There no single function for doing it, but it can be done by just a few lines of code.
Assuming data
is a QByteArray
with the data to be inserted into the file.
QFile file("myFile");
file.open(QIODevice::ReadWrite);
QByteArray fileData(file.readAll());
fileData.insert(20, data); // Insert at position 20, can be changed to whatever you need.
file.seek(0);
file.write(fileData);
file.close();