What actually gets into the ini file?

BTW: QDir::homePath() may not be where you think it is if there is no HOME environment in the running program's environment.