Important: Please read the Qt Code of Conduct -

Plugin "qtquickcontrolsplugin" not found

  • 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/ -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/ 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 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 \

    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.

  • A bit of an update, I copied the 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/ module "QtQuick.Controls" version 1.2 is not installed

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

  • 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/ -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 (, 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.

  • Lifetime Qt Champion

    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.

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

  • Lifetime Qt Champion

    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.