How do you compile the UI files to generate the Headers? Is there another way then having the Qt project mirror the visual studio project and compiling with Qt to get them? I guess I could have a bat file or something that does it. What needs to be run to generate the header files from the UI?
3 Answers
You have to use uic on the .ui file. This will give you the .h and the .cpp. Normally you reimplement the classes generated by this step, basically considering them abstract.
4 Comments
moced stuff or not, but I think it doesn't. So you have to moc the header file you obtain. In any case, if you use qmake, it does everything for you.In most situations you shouldn't be dealing with uic or moc directly.
You have qmake to take care of business for you.
qmake generates a Makefile based on the information in a project file. Project files are created by the developer, and are usually simple, but more sophisticated project files can be created for complex projects. qmake contains additional features to support development with Qt, automatically including build rules for moc and uic. qmake can also generate projects for Microsoft Visual studio without requiring the developer to change the project file.