1

I created a widget in Qt designer. After generating .ui file , now I want to compile it in qt creator. The .ui file is opened but run, build, debug .etc button are not enabled. How can I run this in qt creator? Creating a project and pasting .ui file into the project directory doesn't work. Thanks.

1 Answer 1

1

The ui file must be added to the FORMS section of the .pro file.

FORMS+=yourfile.ui

The build step uses the /bin/uic command in the Qt directory (so you could conceivably do this manually from the command line outside of the IDE) to convert the .ui into a .h and a .cpp file (yourfile.ui becomes ui_yourfile.h).

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

3 Comments

this needs more info. any reference?
@greendino Sorry, I haven't used Qt since about this timeframe. It may have changed since version 3 or 4.
(This was for the C++ version which may be why the syntax and info doesn't fit in with what you're expecting)

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.