#define EOF (-1)
QFile file("/path/to/file");file.open(QIODevice::ReadWrite)QButeArray barray;barray.append(EOF);file.seek(position)file.write(barray);file.close;