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

ui_*.h Files generated in wrong directory



  • Hello all

    Each time I compile my program, the new ui_*h-Files are generated in the Release-path.
    By this, they are not included in the compiling process and my updates in the *ui-Files are not taken over into the EXE.

    I have to compile first, copy the files manually into the project directory every time and recompile before the changes are taken into the exe.

    What to do?

    Thanks,

    Thomas


  • Lifetime Qt Champion

    Hi,

    Please show your .pro file.



  • #-------------------------------------------------
    #
    # Project created by QtCreator 2017-06-07T18:03:58
    #
    #-------------------------------------------------
    
    QT += core gui
    QT += printsupport
    QT += network
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    TARGET = PumpPro
    TEMPLATE = app
    
    # The following define makes your compiler emit warnings if you use
    # any feature of Qt which as been marked as deprecated (the exact warnings
    # depend on your compiler). Please consult the documentation of the
    # deprecated API in order to know how to port your code away from it.
    DEFINES += QT_DEPRECATED_WARNINGS
    
    # You can also make your code fail to compile if you use deprecated APIs.
    # In order to do so, uncomment the following line.
    # You can also select to disable deprecated APIs only up to a certain version of Qt.
    #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
    
    
    SOURCES += main.cpp\
            mainwindow.cpp \
        general.cpp \
        qcustomplot.cpp \
        sqlite3.c \
        hilfefenster.cpp \
        drosselberechnung.cpp \
        digitalisierung.cpp \
        dig2.cpp \
        qhi.cpp \
        drehmoment.cpp \
        npsh.cpp \
        isobar.cpp \
        isochor.cpp \
        alternativ.cpp \
        bypass.cpp \
        parallel.cpp \
        simulation.cpp \
        tco.cpp \
        einstellungen.cpp \
        anlage.cpp \
        pumpenauswahl.cpp \
        betriebspunkt.cpp \
        kurve.cpp \
        anlage_O.cpp \
        messpunkte.cpp \
        messung.cpp \
        yocto_genericsensor.cpp \
        yapi/yapi.c \
        yapi/yfifo.c \
        yapi/yhash.c \
        yapi/yjni.c \
        yapi/yjson.c \
        yapi/ykey.c \
        yapi/ymemory.c \
        yapi/ypkt_lin.c \
        yapi/ypkt_osx.c \
        yapi/ypkt_win.c \
        yapi/yprog.c \
        yapi/ystream.c \
        yapi/ytcp.c \
        yapi/ythread.c \
        yocto_api.cpp \
        sensoren_cfg.cpp \
        pumpe_o.cpp \
        gkurve.cpp
    
    HEADERS  += mainwindow.h \
        qcustomplot.h \
        hilfefenster.h \
        betriebspunkt.h \
        kurve.h \
        anlage_O.h \
        messpunkte.h \
        messung.h \
        yocto_genericsensor.h \
        yapi/yapi.h \
        yapi/yapiresource.rc \
        yapi/yapiresource64.rc \
        yapi/ydef.h \
        yapi/yfifo.h \
        yapi/yhash.h \
        yapi/yjni.h \
        yapi/yjson.h \
        yapi/ykey.h \
        yapi/ymemory.h \
        yapi/yprog.h \
        yapi/yproto.h \
        yapi/ytcp.h \
        yapi/ythread.h \
        yapi/yversion.h \
        yocto_api.h \
        sensoren_cfg.h \
        pumpe_o.h \
        gkurve.h
    
    FORMS    += mainwindow.ui \
        hilfefenster.ui \
        messung.ui \
        sensoren_cfg.ui \
        messung2.ui \
        gkurve.ui
    
    DISTFILES += \
        sqlite3.dll \
        icon.rc \
        PumpPro.db \
        PumpProMedia.db \
        PumpPro_en.qm \
        PumpPro_fr.qm \
        PumpPro_it.qm \
        Version_history \
        Aus Kurve.png \
        Manuell.png \
        yapi/yapi.def
    
    RC_FILE = icon.rc
    
    TRANSLATIONS += PumpPro_fr.ts PumpPro_en.ts PumpPro_it.ts
    
    RESOURCES += \
        pumppro.qrc
    
    # add windows socket 2 library and Setup API
    win32: LIBS += -lws2_32
    win32: LIBS += -lSetupApi
    
    # add Yoctopuce Library to the Include path
    INCLUDEPATH += $$PWD/yapi/
    
    QMAKE_CXXFLAGS_WARN_OFF -= -Wunused-parameter
    
    


  • Strange....

    I just deleted the ui_* - files from the project directory and then the compilation included the changes in the .ui files immediately.

    Seems to be solved...


  • Lifetime Qt Champion

    @Tomax63

    Yeah you have to be careful with that.

    If you use shadow building (i.e. build dir is outside source dir), but have generated files or Makefiles in the source dir, strange things may happen.

    But good you figured it out :)

    So please mark this topic as SOLVED too. Thanks


Log in to reply