Use QFile instead of FILE * functions