Results 1 to 5 of 5

Thread: How to change path where ui_* files are generated?

  1. #1
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default How to change path where ui_* files are generated?

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to change path where ui_* files are generated?

    You can set UI_DIR in your pro file, but this affects all ui files.

  3. The following user says thank you to Lykurg for this useful post:

    Tiansen (7th April 2010)

  4. #3
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to change path where ui_* files are generated?

    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.

  5. #4
    Join Date
    Feb 2008
    Posts
    79
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How to change path where ui_* files are generated?

    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.

  6. #5
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to change path where ui_* files are generated?

    Quote Originally Posted by Tiansen View Post
    Is the only solution to use absolute paths?
    You can use relative pathes! e.g. "../../ui/ui_xxx.h"

Similar Threads

  1. Qt 4.6.2 examples -- generated files missing
    By jiapei100 in forum Qt Programming
    Replies: 0
    Last Post: 1st April 2010, 06:03
  2. qmake generated .sln files not build by vcbuild?
    By akos.maroy in forum Qt Tools
    Replies: 2
    Last Post: 23rd November 2009, 09:04
  3. Form generated header files
    By Rockem in forum Qt Programming
    Replies: 3
    Last Post: 20th August 2009, 12:55
  4. Generated Files ... VS2005 How do I regenerate?
    By jeffpogo in forum Qt Programming
    Replies: 1
    Last Post: 19th May 2009, 00:54
  5. No .h or .cpp Files Generated
    By gwb in forum Qt Tools
    Replies: 7
    Last Post: 21st April 2007, 19:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.