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. Plugin "qtquickcontrolsplugin" not found
QtWS25 Last Chance

Plugin "qtquickcontrolsplugin" not found

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qtquickmacdeployqtqmlos x
6 Posts 2 Posters 4.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.
  • S Offline
    S Offline
    Spencer
    wrote on 26 Aug 2016, 02:30 last edited by Spencer
    #1

    Hey everyone,

    I have been working on a OS X Qt (5.7) application for the past month or so and, now that I'm ready to deploy it, I'm receiving a strange message when I go to run the application (both from terminal on my own machine and running it through terminal on the deployment machine).

    I'll go through the steps I take when attempting to deploy this application:

    1. Clear the release directory, run qMake and build the project (at this point I can still run the project in Qt Creator and through Terminal).
    2. Go to the Qt/5.7/clang_64/bin directory and run "macdeployqt" as follows:
    ./macdeployqt /path/to/application.app -qmldir=/path/to/qml/directory
    // For what it's worth, my QML directory only contains a main.qml and qml.qrc file
    
    1. When I go to run the application (either through Qt Creator, clicking the .app file or via Terminal), I'm greeted with an error that reads "file:///Path/To/Release/application.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:41 module "QtQuick.Controls" plugin "qtquickcontrolsplugin" not found"

    Unsurprisingly, qtquickcontrolsplugin.dylib isn't present in that directory.

    Also, if I restart this process and comment out anything that references the FileDialog that I use, the application works fine after the macdeployqt.

    For reference, here are my imports for my main.qml and application.pro files:

    import QtQuick 2.7
    import QtQuick.Controls 2.0
    import QtQuick.Layouts 1.0
    import QtQuick.Dialogs 1.2
    //found in my main.qml
    

    QT += qml \
    quick \
    serialport \
    widgets \
    concurrent

    I've been scratching my head over this for the past couple of days and any help will be greatly appreciated!

    EDIT: Just to keep everything clear, my implementation of FileDialog functions properly prior to the macdeployqt call.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Spencer
      wrote on 26 Aug 2016, 18:18 last edited by
      #2

      A bit of an update, I copied the application.app/Contents/Resources/qml/QtQuick/Controls directory from one of my earlier deployment attempts and this seems to resolve the missing plugin issue!

      Unfortunately, now it seems that the DefaultFileDialog.qml is throwing an error that reads:
      /Path/To/application.app/Contents/Resources/qml/QtQuick/Dialogs/DefaultFileDialog.qml:41 module "QtQuick.Controls" version 1.2 is not installed

      Here's to hoping this issue is easier to resolve!

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Spencer
        wrote on 26 Aug 2016, 21:54 last edited by
        #3

        It's been resolved!!

        Not sure if this had any influence on anything, but here's my final macdeployqt command (from the macdeployqt's own directory)

        ./macdeployqt /Path/To/application.app -qmldir=/Path/To/QML/Directory -always-overwrite
        

        Turns out macdeployqt didn't properly transfer all of the QtQuick files to my application, when macdeployqt was called.

        To resolve this, I went to /Path/To/Qt/5.7/clang_64/qml/QtQuick and copied all of the files in that directory, then I went to my app's QtQuick directory (application.app/Contents/Resources/qml/QtQuick), deleted everything and pasted the files I copied from Qt's directory. This was also done for the QtQuick.2 directory.

        Now I can run the application (include the FileDialog) on another OS X machine!

        Hopefully these posts can serve as reference for someone in a similar as I was.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 27 Aug 2016, 23:01 last edited by
          #4

          Hi and welcome to devnet,

          When you are using QML in your project, you should always pass the path to your QML code to the deployment tools. That way, it will get parsed and all the dependencies should be pulled in. Only the needed dependencies.

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

          S 1 Reply Last reply 27 Aug 2016, 23:50
          0
          • S SGaist
            27 Aug 2016, 23:01

            Hi and welcome to devnet,

            When you are using QML in your project, you should always pass the path to your QML code to the deployment tools. That way, it will get parsed and all the dependencies should be pulled in. Only the needed dependencies.

            S Offline
            S Offline
            Spencer
            wrote on 27 Aug 2016, 23:50 last edited by Spencer
            #5

            @SGaist Thanks!

            With that being said, isn't that what the -qmldir option does when using macdeployqt?

            In both my posts containing my macdeployqt command, I've included the -qmldir option, but it seems like it has never fully transferred all of the necessary QtQuick files (forcing me to copy them over from the /Qt/5.7/clang_64/qml/QtQuick and /QtQuick.2 directories).

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 28 Aug 2016, 06:29 last edited by
              #6

              Yes it is, but I just saw I misunderstood how you used it. There's been cases where developer gave the Qt installation QML path.

              Can you share your QML imports ? There might be something there that could be useful to understand why not everything needed was included.

              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

              1/6

              26 Aug 2016, 02:30

              • Login

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