I am currently working on a QT C++ project and have been able to get it to compile using the following steps:
  1. Place all my .h and .cpp files in the directory MyProject
  2. Run make clean (obviously not on the first go)
  3. Create the QT project file using qmake -project
  4. Do the QT precompilation (qmake -spec macx-g++ && qmake)
  5. Open the .xcodeproj file then build and run.


I have wrapped this in a shel script which I can run and do it all at once.

Qt Code:
  1. #/bin/bash
  2. make clean
  3. qmake -project
  4. echo "QT += network" >> MyProject.pro
  5. qmake -spec macx-g++
  6. qmake
To copy to clipboard, switch view to plain text mode 
Now whilst all of this works fine it involves creating a new XCode project each time (losing any of my project settings) and because qmake generates .moc files I need to run it pretty much every time I create a new class.

My question is does anyone know of another way to do this? I need to generate all the temporary files used by QT, setup the XCode project in the same way (with all libraries and settings) but without having to redo the whole thing.

Thanks in advance.