Actually it should work, if the paths are correct.
Have you rerun qmake after changing .pro?