Why does qt by default #include a ui_<projectname>.h file in the cpp file even though I don't see it in my project directory?
-
Hi, welcome to the forum.
This is a file automatically generated by the uic tool for designer classes. You have a mafs.ui designer file in your project and from that a ui_mafs.h file is generated during project build.
That file is generated in the build directory when you compile the project. You can see it and its contents there. It contains the C++ code for that designer class and implementation of that
setupUi()method that is called in your class constructor.Also it's not project name. It's the .ui file name. It just so happens that it is named the same as the project. If you had multiple .ui files in your project you would get a ui_*.h file for each of them.
