Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. "QtQuick" plugin "qtquick2plugin" not found in MacOS C++ app using Qt5.15.2

"QtQuick" plugin "qtquick2plugin" not found in MacOS C++ app using Qt5.15.2

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qtquick2plugin5.15
22 Posts 3 Posters 4.6k 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.
  • SGaistS SGaist

    Using the standard package provided by the online installer ?

    If not, did you check that bug report ?

    F Offline
    F Offline
    franzhelmut
    wrote on last edited by
    #7

    @SGaist yes, standard package. It all worked when I used 5.7

    F 1 Reply Last reply
    0
    • F franzhelmut

      @SGaist yes, standard package. It all worked when I used 5.7

      F Offline
      F Offline
      franzhelmut
      wrote on last edited by
      #8

      @franzhelmut I did this exactly the same way on 2 separate computers, one being a new Mac mini with M1 chip running Big Sur, and a MacPro running Mojave, same results.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #9

        Did you try to run macdeployqt with more verbosity to see if it's complaining about something related to that module ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        F 1 Reply Last reply
        0
        • SGaistS SGaist

          Did you try to run macdeployqt with more verbosity to see if it's complaining about something related to that module ?

          F Offline
          F Offline
          franzhelmut
          wrote on last edited by
          #10

          @SGaist yes, I did. macdeployqt doesn't think Quick2 is necessary, there is no reference to it at all. How can I add it "by hand"? I am now trying the same thing on Windows 10 and see what happens there.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #11

            How are you doing your imports ?
            Can you provide a minimal compilable example that shows this behaviour ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            F 1 Reply Last reply
            0
            • SGaistS SGaist

              How are you doing your imports ?
              Can you provide a minimal compilable example that shows this behaviour ?

              F Offline
              F Offline
              franzhelmut
              wrote on last edited by
              #12

              @SGaist no way, this is a really complicated application

              F 1 Reply Last reply
              0
              • F franzhelmut

                @SGaist no way, this is a really complicated application

                F Offline
                F Offline
                franzhelmut
                wrote on last edited by
                #13

                @franzhelmut my main.qml has these imports:
                import QtQuick 2.7
                import QtQuick.Window 2.2
                import QtQml.Models 2.1
                import QtQuick.Controls 1.4
                import QtQuick.Controls.Styles 1.4
                import QtQuick.Layouts 1.3
                import QtGraphicalEffects 1.0
                import QtQuick.XmlListModel 2.0
                import Qt.labs.settings 1.0

                in my working 2.7 version I have a quick folder inside of a Plugins folder with delis for each of these, in my 2.15 Plugins I have no quick folder.
                I now collected the equivalent dylibs from 5.15.2 and put them in a quick folder inside of Plugins. Now I don't get any complaints about missing components, but I get this:
                QQmlApplicationEngine failed to load component
                qrc:/qml/main.qml:1080:5: Type FrontPage unavailable

                FrontPage is a major QML component in my main.qml

                On Windows 10 I do get all the components from the deployment, but I also don't get any user interface when I run the application.
                So I am guessing something changed in a fundamental way with QML from version 5.7 to 5.15

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  franzhelmut
                  wrote on last edited by
                  #14

                  what I also wanted to mention is that in Debug mode everything works as it should, that would indicate to me that the code is correct

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #15

                    IIRC, at least on Windows you can pass additional modules to deploy. Did you try that ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    F 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      IIRC, at least on Windows you can pass additional modules to deploy. Did you try that ?

                      F Offline
                      F Offline
                      franzhelmut
                      wrote on last edited by
                      #16

                      @SGaist No, but the Mac version is my main problem, one big issue I have there is now fixed in 5.15, it has to do with color.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #17

                        Do you have the same issue with a small default application ?

                        If not, then, add new modules until you find the one that makes things fall appart, that will help pinpoint issue.

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        F 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Do you have the same issue with a small default application ?

                          If not, then, add new modules until you find the one that makes things fall appart, that will help pinpoint issue.

                          F Offline
                          F Offline
                          franzhelmut
                          wrote on last edited by
                          #18

                          @SGaist My Windows application runs just fine now, doesn't that mean that this is a Qt deploy problem?
                          Where do we go from here?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #19

                            What did you do on Windows to make it work ?

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            F 1 Reply Last reply
                            0
                            • SGaistS SGaist

                              What did you do on Windows to make it work ?

                              F Offline
                              F Offline
                              franzhelmut
                              wrote on last edited by
                              #20

                              @SGaist nothing at all, I remember my window positions in the settings and restore them. Unfortunately I had removed the monitor that my window had been on and didn't properly handle that in the code. So removing my Regedit entries brought everything back.

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #21

                                Sorry, I thought you were saying the installer issue was fixed.

                                Hence my request to reproduce your issue with a minimal example, that will allow to check what is going on on macOS.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • veryqtpersonV Offline
                                  veryqtpersonV Offline
                                  veryqtperson
                                  wrote on last edited by
                                  #22

                                  I've gotten the same problem with my static build of Qt 5.15.2.

                                  The solution in my case (using CMake) was to call qt5_import_qml_plugins:

                                  get_target_property(QT_TARGET_TYPE Qt5::Core TYPE)
                                  if(${QT_TARGET_TYPE} STREQUAL "STATIC_LIBRARY")
                                      find_package(Qt5QmlImportScanner REQUIRED)
                                      qt5_import_qml_plugins(${CMAKE_PROJECT_NAME})
                                  endif()
                                  

                                  Not sure what is the equivalent in Qt 6, haven't tested it myself and can't find qt6_import_qml_plugins in documentation.

                                  Anyway, qt5_import_qml_plugins is available only from Qt 5.14(?), so for older versions the alternative would be this external module.

                                  1 Reply Last reply
                                  0

                                  • Login

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