Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT unable to find header file



  • Hello everyone,

    I am having an issue with a QT project. I have named all headers files *.hpp. Another developer I am working with added a module to the project using *.h for the header file. I removed the file from the project renamed it and added the file under the new name file.hpp to the project. I changed the implementation file to use the new header in the format file.hpp. When I attempt to compile the project I get an error stating that "file.h: No such file or directory". The error appears in the ui_mainwindow.h file.

    I am currently resolving this issue by changing the name of the #include file from *.h to *.hpp and saving but, each time I build the project the issue needs to be resolved again. I have checked my project.pro file and the names of headers are all correct. Can anyone help me resolve this issue?



  • Did you re-run qmake after your changes?



  • Did you re-run qmake after your changes?



  • Thanks VRonin,

    Your solution resolved the issue. Kind of kicking myself for not thinking about that.