Find qmake in $QMAKE or $QTDIR/bin rather than rely on $PATH.