I have received a demo Qt project for a product. I am trying to build the project and run it. I am getting such a kind of error in Qt Designer when I try to build the project. It says ui_FOO.h does not exist. I see that FOO.ui (the qt designer form exists) but source and header files for it do not exist. And thats why i am getting the error. What should I do to be able to build and run my project?
2 Answers
Add the following line to the pro file to get uic generate the C++ header from the ui file:
FORMS = FOO.ui
and build your project again.
You can find more information from Using a Designer UI File in Your Application.
Comments
Oh I got it. This is a qt4 project as it is written in manual. I went under tools->options->build&run->qtversions and added qmake-qt4 Then under the kit manually added a kit which uses the qtversion that i just specified. Then under projects tile clicked on add kit and the kit appeared. I removed the qt5 kit.
Now those ui_foo.h file is generated in its corresponding build path.