As a work-around you can either create a symlink in /usr/bin from g++/gcc to g++-4.2/gcc-4.2 or change the mkspec used in the Project settings (Project->Build Settings->qmake step).

Originally we just used the un-versioned mkspec, but that got me quite a few bug reports when people were using older xcode versions to write software that worked well on all the older Mac OS X boxes out there. Nobody reported this breaking in Mac OS X 10.7 with a new Xcode till after the release:-( Sorry for the inconvenience.

I am trying out Qt for the very first time and I am working on OSX 10.7.2 and have Xcode 4.2 installed. While I have programming experience, I am pretty new to C++ development and I was wondering, if you could explain a little bit more in detail how I need to configure Qt in order to make it work. I am not sure where I have to make the changes that you explained in this post and would appreciate your help greatly. Thanks, Michael

Please make sure that qmake is rerun after changing the spec parameter. QMake generates the makefiles used to build the project and if it is not rerun then you will still have the old ones which refer to g++-4.2.