Get environment value using Qt
C++ 17 or higher version
j2::Qt6
// main.cpp
#include <QCoreApplication>
#include <QDebug>
#include "GetEnv.h"
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QStringList pathList = j2::Qt6::GetOSPath();
foreach (QString pathName, pathList)
{
qDebug() << pathName;
}
return 0;
}