1
votes

I'm using a cmake-project with Qt Creator. Everything works and builds fine except Qt Creator does not show any .ui files in the project tree. If I want to edit a .ui file in the designer, I have to switch to the file system view and locate it manually.

Is there a way to tell Qt Creator / cmake to add the .ui-files to the project tree (or .cbp-file) as well?

1

1 Answers

5
votes

QtCreator shows only files that are used as sources for some target. You can add your .ui files to some target to see them in the IDE, for example:

add_executable(some_target <sources> file1.ui file2.ui)