this question may have been asked several times but non of the answers solved my problem . I my c++ qt5 program I get 'ui_mainwindow.h' file not found with a red line under ui_mainwindow.h . Indicating that qt IDE can not find my ui_mainwindow.h file but despite this error the program runs with out a problem. even after deleteing the build folder , performing clean - run qmake - and rebuild the error message is still there but the program runs. So why the IDE pesters me with that annoying message? Have any one encountered such a problem?