Qt World Summit: Submit your Presentation

Header files in project tree

  • When is it appropriate in the Qt ide to add your headers into the project via "Add new files" versus just doing the work in the includepath .pro file and "header" in the cpp file? Why can't I simply "Add [my] new .hpp" file into the project (lets say x.hpp) and simply refer to it as if it were in the same directory as the file referencing it? Simple include "/x.hpp". I want to use the New File command to add header files, it keeps the project organized, but I am not sure how.

    Bottomline I would like a recomendation on whether to use the "Add new file(s)" for the project. Whats the point of doing the .pro, .cpp AND "Add new file".


Log in to reply