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
Forum Updated to NodeBB v4.3 + New Features

Qt Creator UI header file location

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 9.1k Views 1 Watching
  • 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 17 Jul 2012, 23:17 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
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 18 Jul 2012, 12:51 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 18 Jul 2012, 15:40 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 18 Jul 2012, 21:23 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

          4/4

          18 Jul 2012, 21:23

          • Login

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