Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator UI header file location
QtWS25 Last Chance

Qt Creator UI header file location

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 9.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    gibbogle
    wrote on last edited by
    #1

    I am building my Qt app with Qt Creator 2.0.1, on Windows 7 (from the SDK), using the mingw32 tools. My source code and .pro file all reside in foo\GUI, and I am doing a Shadow build in foo\build. It is annoying that when I make changes to a form the revised UI header is created in the build directory, and is not found by the compiler, which is looking for it in the source directory. I can copy the header file across manually, of course, but I'm sure there must be a way to have the file created in the same directory as all the other source files. Can someone throw some light on this?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Take a look at how you include the ui_<filename>.h files in your headers. It's probably looking for them in current dir. Add foo/build to qmake's includepath, maybe? Never had that problem myself, to be honest.

      (Z(:^

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        You can change where to create them using the UI_DIR variable in your .pro file. I prefer to not have them mixed with my source files, but that may just be me. I like to keep generated files and manually created files separate in your projects.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gibbogle
          wrote on last edited by
          #4

          Thanks Andre, I'll try that. Any idea why in this case the compiler thinks the automatically-generated header is in foo\GUI, rather than in foo\build, which is where it usually looks?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved