I created a solution in VS 2005 using "File->New Project->Qt4 Projects -> Qt Application". During the build process, 6 new files are created.
It looks like there are two from the .ui file (qrc_application.cpp and ui_application.h) and the other 4 are from two of my classes which inherit from QWidget.
Whenever I add a .ui file to the solution, that is also built automatically and everything is fine.
The problem lies with my MFC based solution that I'd like to add a Qt dialog to. If I add the .ui files then they aren't built automatically. Neither are the customised QWidget files. This obviously causes problems as I need to include ui_application.h when initialising the dialog.
I think this comes down to some project settings / preferences, or extra command line options. I found a tutorial here which explains what is going on but obviously this is going to take time if it isn't automated like in my original project:
I've tried comparing the two project properties and there are no great differences or references to uic and moc that I could find.
I've looked at the Qt-MFC migration projects and tutorials and they only talk about converting the MFC code to use the Qt-MFC wrapper classes. There isn't anything (I could find) about changing the project settings.
I'm obviously overlooking something, or moc and uic are initialised by something else in the code.
Any help, as always, is greatly appreciated.