error: 'QQmlApplicationEngine' file not found
-
Hi all,
My Qt version is 4.7.84 and Im getting this error:error: 'QQmlApplicationEngine' file not found
and my pro file is here:
I added these lines to fix the problem there werent these codes at firstQT += widgets QT += qml QT += gui QT += multimedia
QT += quick qml multimedia widgets QT += widgets QT += qml QT += gui QT += multimedia CONFIG += c++11 # The following define makes your compiler emit warnings if you use # any feature of Qt which as been marked 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 \ controller.cpp \ pyloncamera.cpp \ testobject.cpp \ cameracalibrator.cpp \ logging.cpp \ imagecontrol.cpp INCLUDEPATH += /usr/local/include/opencv INCLUDEPATH += /opt/pylon5/include #LIBS += -L/usr/local/lib/ -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs LIBS += -L/opt/pylon5/lib64 -Wl,-E -lpylonutility -lGenApi_gcc_v3_1_Basler_pylon_v5_1 -lGCBase_gcc_v3_1_Basler_pylon_v5_1 LIBS += `pkg-config --cflags --libs opencv` LIBS += -L/opt/pylon5/lib64/ \ -lbxapi \ -lNodeMapData_gcc_v3_1_Basler_pylon_v5_1 \ -lLog_gcc_v3_1_Basler_pylon_v5_1 \ -lXmlParser_gcc_v3_1_Basler_pylon_v5_1 \ -lpylonutility \ -lpylonutility-5.1.0 \ -lGenApi_gcc_v3_1_Basler_pylon_v5_1 \ -lGCBase_gcc_v3_1_Basler_pylon_v5_1 \ -lpylonbase-5.1.0 \ -lMathParser_gcc_v3_1_Basler_pylon_v5_1 RESOURCES += qml.qrc HEADERS += \ controller.h \ pyloncamera.h \ testobject.h \ calibframe.h \ cameracalibrator.h \ logging.h \ imagecontrol.h FORMS += DISTFILES +=
-
@Yunus
if you have the option to upgrade to qt5 that I would suggest going with the newest 5.12.3 or the latest LTS version (iirc 5.9)otherwise you'll have to check get the source code of QQmlApplicatioEngine and compile it with your qt4 setup.
But the difference between 4 and 5 is huge and my not be possible or a huge end over
-
@Yunus This is a really common mistake by new users/developer, when "we" speaking about Qt Version, the meaning is "Qt Kits Version".
You can find them in Qt Creator menu "Tools/Options/Kits", there are the different Qt Versions available for build a project: a Qt Kit is defined by Qt source version (5.x.x), target plateform (Linux x86/ARM, Android, IOs, Windows flawors, etc) and compiler type/version (GCC, CLANG, MSVC, etc).QtCreator is an IDE that helps source code editing and debuging, Qt Kit, is the Qt Libs your used to build your application.
hope this is more clear for you now.