I am working on a Qt project and I want the working directories to be dynamically set for the program will be run on different systems.
I have enclosed the code for your reference.
QProcess Home;
Home.start("echo",QStringList() << "$HOME");
Home.waitForFinished(-1);
qDebug() << Home.readAllStandardOutput();
But the qDebug() prints "$HOME" and not the actual home path. Why does this happen? Is There any other way of doing this?