Using uic files in headers



  • Hi,
    First I'm a noob and I'm not sure I'm in the right forum - sorry if I'm wrong.

    I have reviewed several tutorials and I'm now attempting to compile xTuples 'openrpt'. In the code there are several places (in header files) that use files created from 'uic' i.e in login.h there is an include "#include "tmp/ui_login.h". When I run build it fails to find the file. The file exist and I don't understand why build fails on the file. That said the real question is:
    I see this as some sort of trick (at least not covered in my tutorials). A header file that uses "ui_filename.h" that does not exist until 'uic' is run. Is this a normal way to deal with UI files?

    BTW if you can help with the compile that would be great!
    Johnf



  • ui_*.h files are generated by the uic (ui compiler), so they are created only when uic is run (generally as part of build process).

    ui files are included like "#include "ui_login.h". Why do use "tmp" in the ui path, as you sure the login.ui (ui disigner file) is in "tmp" folder?



  • Funny I was told that C++ was the wrong place to post and here I get a response.

    Anyway, I actually don't understand why it's setup with 'tmp' except to say that is where the file is located. That said, I don't understand any of the '.pro' files - in that they do NOT follow any of the tutorials I have been using.

    It's true that the xTuple folks are most likely experts but it seems that they have made the source overly complex (at least I don't see the reasoning behind the structure). I was able to compile by placing the complete path for the file.

    So I am moving forward - thanks for your help.

    Johnf


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.