Trolltech is delivering a precompiled Qt 4.2.2 DMG with installer , very good !
But they forgot to transform it to an opensource version so each time you try to compile something:

error: 'QtValidLicenseForCoreModule' does not name a type

Solution: edit /Library/Frameworks/QtCore.framework/Versions/4/Headers/qconfig.h and change line 5:

# define QT_EDITION QT_EDITION_UNKNOWN

# define QT_EDITION QT_EDITION_OPENSOURCE