Try to use QMAKESPEC env variable.