0

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 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.