Hi,
I have one question because Im definitely missing something. I need to save system $HOSTNAME into QString. When I run echo $HOSTNAME from terminal I get the result. But from Qt when I try getenv("HOSTNAME") I get nothing. I tried the same with USERNAME and everything works fine. Then I tried print QProcess::systemEnvironment() and HOSTNAME variable wasnt in the result. It seems like my linux system does not export HOSTNAME for other applications or what? Is there a way to get HOSTNAME easily into QString?
Thanks![]()
Bookmarks