Error: ui_widget.h: No such file or directory #include “ui_widget.h”



  • Hello!
    I'm trying to transfer project from Qt 4.8.5 to Qt 5.2.0 and when I put some 5.2.0 libs instead 4.8.0 I found this error:
    /home/flawless/projects/ROV/host/gui/widget.cpp:2: error: ui_widget.h: No such file or directory
    #include "ui_widget.h"
    In old versoin program worked fine.
    When I manually make ui_widget.h file with Qt Designer error disappears.
    Sorry for my english and thanks in advance.



  • Hi,
    The ui_ files are generated by compiler via QMake. Delete your output directory (the debug/release directories) and do a qmake, clean, rebuild process and when you have a designer form used, you will get ui_ files back and all should compile.
    Greetz



  • Thanks, but I found the promblem elsewhere.
    I forgot to add to .pro file @greaterThan(QT_MAJOR_VERSION, 4): QT += widgets@


Log in to reply
 

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