The Qt is the same, isn't it? except you define the include path in the .pro file. I followed the headless build process and it works fine to build Qt too.
I'm having trouble with building qt. Others seem to having trouble as well, and they had to compile qt separately.