PDA

View Full Version : How to change path where ui_* files are generated?



Tiansen
7th April 2010, 14:01
I divided my .cpp, .h and .ui files into subfolders. However when I compile program, ui_* files are still generated in root directory of project. As a consequence, compiler does not find some headers. How can I set path where ui_* files for particular classes are generated? I am using Qt Creator 1.3.1.

Lykurg
7th April 2010, 14:07
You can set UI_DIR in your pro file, but this affects all ui files.

Tiansen
7th April 2010, 14:27
Thanks for answer. Can it somehow be set so, that it generates ui_ files in same directory where .ui files are?

If not, how can I solve problem that it doesn't find some headers that are in subfolders then?? Is the only solution to use absolute paths?? That would be ugly.

Let me explain again little better how my files are divided, so that there is no misunderstanding:
I divided them by classes so that files of some classes are in first subdirectory, files of another classes in second subdirectory and so on. If ui_ files are generated in root then it obviously does not find header files that are in subfolders.

Tiansen
7th April 2010, 14:37
After further testing I discovered this is actually not a problem, and headers are found.

Thanks for tip, Lykurg, we can close this thread for now.

Lykurg
7th April 2010, 14:39
Is the only solution to use absolute paths?
You can use relative pathes! e.g. "../../ui/ui_xxx.h"