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

Link the Qt framwork which in my Project shows error : ui_*.h file not found



  • Hi:
    I developed a qt project on macos, here is my normal .pro file:

    QT += core opengl widgets gui network webengine multimedia multimediawidgets quick

    and when I run it, it's work fine, now I want to add the qt framework into my project for easy deployment, so I change the .pro file to this:

    LIBS += -F$$PWD/StaticLibrary/Qt/
    QMAKE_CFLAGS += -F$$PWD/StaticLibrary/Qt/
    QMAKE_CXXFLAGS += -F$$PWD/StaticLibrary/Qt/
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtQuick.framework/Headers
    mac: LIBS += -framework QtQuick
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtWidgets.framework/Headers
    mac: LIBS += -framework QtWidgets
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtCore.framework/Headers
    mac: LIBS += -framework QtCore
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtGui.framework/Headers
    mac: LIBS += -framework QtGui
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtMultimedia.framework/Headers
    mac: LIBS += -framework QtMultimedia
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtMultimediaWidgets.framework/Headers
    mac: LIBS += -framework QtMultimediaWidgets
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtNetwork.framework/Headers
    mac: LIBS += -framework QtNetwork
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtOpenGL.framework/Headers
    mac: LIBS += -framework QtOpenGL
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtPositioning.framework/Headers
    mac: LIBS += -framework QtPositioning
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtQml.framework/Headers
    mac: LIBS += -framework QtQml
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtWebChannel.framework/Headers
    mac: LIBS += -framework QtWebChannel
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtWebEngine.framework/Headers
    mac: LIBS += -framework QtWebEngine
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtWebEngineCore.framework/Headers
    mac: LIBS += -framework QtWebEngineCore

    when I build it, it shows me the error: fatal error: 'ui_fueditor.h' file not found, I don't know why, can you give me some tips, thanks a lot!


  • Qt Champions 2017

    Do you have FORMS in your project ? what is the configuration of FORMS+= in your pro file ?



  • when I use 'QT += core opengl widgets gui network webengine multimedia multimediawidgets quick' instead of

    'LIBS += -F$$PWD/StaticLibrary/Qt/
    QMAKE_CFLAGS += -F$$PWD/StaticLibrary/Qt/
    QMAKE_CXXFLAGS += -F$$PWD/StaticLibrary/Qt/
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtQuick.framework/Headers
    mac: LIBS += -framework QtQuick
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtWidgets.framework/Headers
    mac: LIBS += -framework QtWidgets
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtCore.framework/Headers
    mac: LIBS += -framework QtCore
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtGui.framework/Headers
    mac: LIBS += -framework QtGui
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtMultimedia.framework/Headers
    mac: LIBS += -framework QtMultimedia
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtMultimediaWidgets.framework/Headers
    mac: LIBS += -framework QtMultimediaWidgets
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtNetwork.framework/Headers
    mac: LIBS += -framework QtNetwork
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtOpenGL.framework/Headers
    mac: LIBS += -framework QtOpenGL
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtPositioning.framework/Headers
    mac: LIBS += -framework QtPositioning
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtQml.framework/Headers
    mac: LIBS += -framework QtQml
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtWebChannel.framework/Headers
    mac: LIBS += -framework QtWebChannel
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtWebEngine.framework/Headers
    mac: LIBS += -framework QtWebEngine
    INCLUDEPATH += $$PWD/StaticLibrary/Qt/QtWebEngineCore.framework/Headers
    mac: LIBS += -framework QtWebEngineCore'

    everything works fine, I don't know why, and it confused me a long time!


  • Qt Champions 2017

    Are you using the Qt Creator ? Did you create the default project with forms in Qt Creator ? Does this work ?



  • @dheerendra
    yes! yes! yes!


  • Lifetime Qt Champion

    Hi,

    What easy deployment are you talking about ?

    On macOS, you can use macdeployqt for the deployment of your application.


Log in to reply