I tried using QFile and QByteArray for this but it got me a headache after some segfaults, so I just let it like that. Will try again soon