I had this problem building jasmine-headless-webkit Ruby gem. Despite having qt4 installed, qmake
(a symlink to qtchooser
) insisted it didn't know about a QT installation. OTOH, it was able to list qt4 when asked directly.
This made everything better:
export QT_SELECT=qt4
qtchooser then knew to use qmake-qt4, and so on.