method 1:
cout << QDir::currentPath().toUtf8().constData();
//home/tjiang/Workspace/TestQT/build-TestCGAL-Desktop_Qt_5_3_0_GCC_64bit-Debug
method 2:
define a macro in pro file
message($${PWD}) #/home/tjiang/Workspace/TestQT/TestCGAL
#message($(PWD)) #/home/tjiang
DEFINES += CGAL_EIGEN3_ENABLED
DEFINES += PROJECT_PATH=\\\"$${PWD}\\\"
then use this macro to define a variable in cpp file
QString projectPath(PROJECT_PATH);
cout << projectPath.toUtf8().constData();