Google shows many pages, but this Qt4 page with Xcode appeared at first glance as a pretty final resource. However, the last time it was changed in 2006.
Please check: http://qt-project.org/doc/qt-5/macosx.html
There is a much later post from the Qt Developer Forum , which seems to contain good information. In particular, this answer of August 19, 2011 gives a complete recipe.
05/25/2016 update:
The first two links are now dead and not archived due to robots.txt .
However, I updated the link to the forum post.
And here is a copy of the answer to emiguel. Now 5 years old, so I do not know how much he is still.
Hi,
To solve my problem, I did the following.
First I will have a subproject in Qt that supports a graphical interface, I created this project as a C ++ library, so I could include this in the main project.
The main project is a C ++ project in Xcode (which is a plugin template with many configurations).
Secondly, I ported the Qt project to Xcode using the spec parameter macx-xcode.
Thirdly, having both projects in Xcode, I can add a library (in Qt) to the main project. To do this, right-click in the xcode project and select the option "existing file ...", select the xcodeproj file from the Qt project. Finally, add the library to the binding phase, this is done by dragging and dropping the lib file located under the xcodeproj file into the "Goals" section of "Linking to Libraries".
Fourth, import Qt framewoks into the main project, do it, right-click in the main project, click add existing structure, select the Qt functions used by the project (for example, QtSDK / lib / QtCore.framework)
Finally, add the header and library paths to the main project. Click on the project menu-> project parameters, set the parameter for the search path for the header with the headers Qt (ex QtSDK / include //) and the library search path (ex QtSDK / lib // **).
That's all, now I can create an instance of my own Qt widgets from a C ++ project.
Note. I need to take an extra step because my goal is i386 and the downloaded version of Qt is 64 bits, so I downloaded the sources and compiled them for i386.
Now I have other problems with drawing the internal plugin ... but I think it will be for another post.
Many thanks for your help
Finally, the current information on building Qt in Xcode is available in Qt for OS X - it is too long to copy here, and Qt will be supported and updated ...