You can use std::getenv
to retrieve the home path set in the processes environment.
#include <cstdlib>
const char *homePath = std::getenv("HOME");
if(homePath != NULL)
{
QProcess Home;
Home.start("echo",QStringList() << homePath);
Home.waitForFinished(-1);
qDebug() << Home.readAllStandardOutput();
}