I have an environment variable that I've set in
~/.profile with the following line:
When I log in and load up a terminal, I can verify that the variable is set:
$ printenv APPDIR
I'm trying to access this variable from within a Qt application:
QString appdir = getenv("APPDIR");
QTWARNING("dir: |" + appdir + "|");
The warning window that pops up shows me:
What is going on here? Am I misunderstanding about how environment variables work in Ubuntu?
This is with a C++/Qt App on Ubuntu 11.10 x86.