QT += core gui QT += 3dcore 3drender 3dextras 3dinput QT += sql QT += texttospeech QT += charts QT += opcua QT += concurrent greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++17 # Qt版本检查 contains(QT_VERSION, ^5\\.14\\..*) { message("使用Qt 5.14.x版本") } else { warning("推荐使用Qt 5.14.2版本") } # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 FORMS += \ Pages/P00_PublicPage.ui \ Pages/P01_MianPage.ui \ Pages/P02_ShieldPage.ui \ Pages/P301_PumpPage.ui \ Pages/P401_CuttingPage.ui \ Pages/P501_LoaderPage.ui \ Pages/P601_TransportPage.ui \ Pages/P07_CylinderPage.ui \ Pages/P08_AlarmPage.ui \ Pages/P901_RemotePage.ui \ Pages/P902_RemotePage.ui \ Pages/P10_IntelligentPage.ui \ Pages/P11_IsolationPage.ui \ Pages/P12_NetworkPage.ui \ Pages/P13_InsPage.ui \ Pages/P14_AtlasPage.ui \ Pages/P15_ParameterPage.ui \ Pages/P16_SettingPage.ui \ LaunchPage.ui SOURCES += \ DataCenter/MySQL.cpp \ PublicFunctions/ObjLoader.cpp \ PublicFunctions/TTSManager.cpp \ Pages/P00_PublicPage.cpp \ Pages/P01_MianPage.cpp \ Pages/P02_ShieldPage.cpp \ Pages/P301_PumpPage.cpp \ Pages/P401_CuttingPage.cpp \ Pages/P501_LoaderPage.cpp \ Pages/P601_TransportPage.cpp \ Pages/P07_CylinderPage.cpp \ Pages/P08_AlarmPage.cpp \ Pages/P901_RemotePage.cpp \ Pages/P902_RemotePage.cpp \ Pages/P10_IntelligentPage.cpp \ Pages/P11_IsolationPage.cpp \ Pages/P12_NetworkPage.cpp \ Pages/P13_InsPage.cpp \ Pages/P14_AtlasPage.cpp \ Pages/P15_ParameterPage.cpp \ Pages/P16_SettingPage.cpp \ PublicFunctions/Basic.cpp \ PublicFunctions/BitMaps.cpp \ PublicFunctions/BrushPad.cpp \ PublicFunctions/Components.cpp \ PublicFunctions/CursorController.cpp \ PublicFunctions/RtspPlayer.cpp \ DataCenter/DataCenter.cpp \ DataCenter/OpcUaManager.cpp \ FileOperation/ConfigFiles.cpp \ GlobalDefinitions/Variable.cpp \ PublicFunctions/CurvePlotWidget.cpp \ Threads/SubThread.cpp \ LaunchPage.cpp \ main.cpp HEADERS += \ DataCenter/MySQL.h \ PublicFunctions/ObjLoader.h \ PublicFunctions/TTSManager.h \ Pages/P00_PublicPage.h \ Pages/P01_MianPage.h \ Pages/P02_ShieldPage.h \ Pages/P301_PumpPage.h \ Pages/P401_CuttingPage.h \ Pages/P501_LoaderPage.h \ Pages/P601_TransportPage.h \ Pages/P07_CylinderPage.h \ Pages/P08_AlarmPage.h \ Pages/P901_RemotePage.h \ Pages/P902_RemotePage.h \ Pages/P10_IntelligentPage.h \ Pages/P11_IsolationPage.h \ Pages/P12_NetworkPage.h \ Pages/P13_InsPage.h \ Pages/P14_AtlasPage.h \ Pages/P15_ParameterPage.h \ Pages/P16_SettingPage.h \ PublicFunctions/Basic.h \ PublicFunctions/BitMaps.h \ PublicFunctions/BrushPad.h \ PublicFunctions/Components.h \ PublicFunctions/CursorController.h \ PublicFunctions/RtspPlayer.h \ DataCenter/DataCenter.h \ DataCenter/OpcUaManager.h \ FileOperation/ConfigFiles.h \ GlobalDefinitions/Configure.h \ GlobalDefinitions/DataType.h \ GlobalDefinitions/MacroDef.h \ GlobalDefinitions/Variable.h \ PublicFunctions/CurvePlotWidget.h \ Threads/SubThread.h \ LaunchPage.h TRANSLATIONS += \ EJM_JueMao_zh_CN.ts CONFIG += lrelease CONFIG += embed_translations # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target RESOURCES += \ Pictures/BottombarButton/BottombarButton.qrc \ Pictures/Buttons/Buttons.qrc \ Pictures/Pictures.qrc # ----------------- OpenCV 自动拷贝 dll ----------------- win32 { # 1. 头文件与库保持原样 INCLUDEPATH += D:/MyQtLibs/OpenCV_Install/include LIBS += -LD:/MyQtLibs/OpenCV_Install/x64/mingw/lib \ -lopencv_core454 \ -lopencv_videoio454 \ -lopencv_imgproc454 \ -lopencv_imgcodecs454 # 2. 正确的 bin 目录(别加 $$PWD) OPENCV_BIN = D:/MyQtLibs/OpenCV_Install/x64/mingw/bin # 3. 定义一个额外目标,每次构建后执行 copyopencv.name = copyopencv copyopencv.input = $$OPENCV_BIN/*.dll copyopencv.output = $$OUT_PWD/${QMAKE_FILE_IN_BASE}${QMAKE_FILE_EXT} copyopencv.commands = $(COPY_FILE) ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT} copyopencv.CONFIG += no_link no_clean QMAKE_EXTRA_COMPILATORS += copyopencv } # Ubuntu配置(保持不变,实现跨平台兼容) unix { INCLUDEPATH += /usr/include/opencv4 LIBS += `pkg-config --libs opencv4` }