What @Linville says is right. Use the correct qmake and those paths will be what you want.
Generally you should not need to set QTDIR and just running the correct qmake should work.
eg
export PATH=/home/ubuntu/Qt5.2.1/5.2.1/gcc/bin:$PATH
mkdir -p $HOME/build/myapp && cd $HOME/build/myapp
# check you have the right qmake
which qmake && qmake -query
# shadow build so as to not pollute your source tree
qmake $HOME/source/myapp/myapp.pro
If for some reason you want to refer to the paths listed by qmake -query you can use $$[QT_INSTALL_DATA] for example.