Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. error: 'QQmlApplicationEngine' file not found
QtWS25 Last Chance

error: 'QQmlApplicationEngine' file not found

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 4 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • YunusY Offline
    YunusY Offline
    Yunus
    wrote on last edited by
    #1

    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 first

    QT += 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 +=
    
    J.HilkJ 1 Reply Last reply
    0
    • YunusY Yunus

      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 first

      QT += 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 +=
      
      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Yunus
      the answer is simple, really:

      QQmlApplicationEngine is a Qt 5 feature only, 5.1 to be exact

      0_1559112362216_8b5a8570-b8d2-433f-9cdd-d52eb902f646-image.png


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      2
      • YunusY Offline
        YunusY Offline
        Yunus
        wrote on last edited by
        #3

        @J-Hilk

        thank for ur reply. Is there a way to use this header with my qt version? or should I uninstall 4.8 and install 5.1 again?

        J.HilkJ 1 Reply Last reply
        0
        • YunusY Yunus

          @J-Hilk

          thank for ur reply. Is there a way to use this header with my qt version? or should I uninstall 4.8 and install 5.1 again?

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @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


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          2
          • YunusY Offline
            YunusY Offline
            Yunus
            wrote on last edited by
            #5

            @J-Hilk Ok. But one more question I have an another computer which has the same qt version and the same code is running on it. its version can be checked below. I guess its version is not 5.1 but why running on it?

            0_1559116549247_cropped.jpg

            jsulmJ J.HilkJ 2 Replies Last reply
            0
            • YunusY Yunus

              @J-Hilk Ok. But one more question I have an another computer which has the same qt version and the same code is running on it. its version can be checked below. I guess its version is not 5.1 but why running on it?

              0_1559116549247_cropped.jpg

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Yunus It shows you which Qt version was used to build QtCreator not the one used to build projects. To find out which Qt version is used check the Kit configuration used.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2
              • YunusY Yunus

                @J-Hilk Ok. But one more question I have an another computer which has the same qt version and the same code is running on it. its version can be checked below. I guess its version is not 5.1 but why running on it?

                0_1559116549247_cropped.jpg

                J.HilkJ Offline
                J.HilkJ Offline
                J.Hilk
                Moderators
                wrote on last edited by
                #7

                @Yunus
                nono, QtCreator != Qt

                QtCreator is your IDE, the qt version you build and link against is defined in your kit, that you use!


                Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


                Q: What's that?
                A: It's blue light.
                Q: What does it do?
                A: It turns blue.

                1 Reply Last reply
                2
                • YunusY Offline
                  YunusY Offline
                  Yunus
                  wrote on last edited by
                  #8

                  @J-Hilk @jsulm Thank you... Sorry for my ignorance

                  KroMignonK 1 Reply Last reply
                  0
                  • YunusY Yunus

                    @J-Hilk @jsulm Thank you... Sorry for my ignorance

                    KroMignonK Offline
                    KroMignonK Offline
                    KroMignon
                    wrote on last edited by
                    #9

                    @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.

                    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

                    1 Reply Last reply
                    3

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved