Important: Please read the Qt Code of Conduct -

[SOLVED] Mac deployment Qt Quick 2.0 Qt 5.3.1

  • Has anyone created a successful bundle for a Qt Quick 2.0 app for Qt5.3.1?

    I have scoured the web looking for a working script and I still am getting 'QtQuick is not installed' error messages after running macdeployqt with the location of the qml dir's pointing to my app's qml folders, i.e.

    /Users/user/Qt5.3.1/5.3/clang_64/bin/macdeployqt -verbose=1

  • Hi,

    I've created the app to prepare your application which you can send it to App Store. To get this application use "link":

    P.S. If you find some issues let me now. I've tried to fix it.
    P.S.S. To send your app to App Store you can use the App Loader from official "Apple Developer site":

  • Hi Shav: Awesome. Some usage questions:

    1. Are the Mac Certs required just to make the package.
    2. What is the entitlements path?
    3. What is the application path? Is it the app folder? e.g.
    4. The QML path, is the path in my app or the path to Qt's QML folders?
    5. What is the install path? Is it where I want the output of the your tool to be placed?


  • Hi gbgsoft

    1. Mac Certs need to use codesign tool. This tool need to use if you want submit your app to App Store. Also this tool helped you remove message dialog about secure. This dialog you can see when try to open application which downloads from websites not from App Store.

    2. The entitlements plist is a manifest from Android (if you understand me). For more information please look "here": Also you may need to "Info.plist keys":

    3. Application path is a full path to you (in you case is

    4. QML path is a path to QML folder with you app QML files which you use in your app.

    5. You mean Qt Install Folder? If this is true this folder is a folder where you install your version of Qt. But you must select it something like this:

    don't select bin folder because application append it itself.


  • Hi Shav: I'm having some problems running the tool.

    The picker buttons that invoke the path searches, eg QML path will not permit me to select folders. When I click on the desired folder, the 'Open' button remains disabled as do all the files in the display.

    The Qt install Folder control will only select the topmost Qt folder and not the clang_64 folder as your example shows.

    The app crashes in several spots, usual when return from a file open dialog, or when invoking it. This has happened from several different spots in the dialog.

    But the biggest problem is that where I want to select a folder, I cannot do so.

  • Thanks for your feedback! I'll check it and fix it as fast as possible.

  • Hi Shav: Fantastic. I have Qt 5.3.1 installed. Would it be helpful to send you the dump file that gets optionally created?

  • Hi gbgsoft,

    I've checked the application and fixed the bug with open QML folder. Also I've added a new flag which give you to create the shell script after first deploy. It will help to you when you will send the next build of app. But when you use the script don't change any paths (QML, Qt Install, your Application, Entitlements.plist, etc.)

    The last version you can find "here":

    P.S. I don't see any crashes when using open folder dialog. Could you send to me crash report by mail thanks.

  • Thanks, I'll try the new build and get back to you. I can't attach the file here. What's your email so that I can send it to you?

  • Please check my profile and you find the link "Send Mail"

  • Hi Shav: I download the upgrade which said that it included the source, but in inspecting the dmg and the package, I couldn't find the source. Where would that be located?

    I ran the upgraded from and it crashed when I tried to select on of the paths (I forget which one), so I'd like to build the program from source and try to see what's happening. Alternatively, is there a git repository for the project. Thanks

  • Hi gbgsoft,

    Sorry I've forgot add the sources to DMG file when upload a new version of project. Please re-download the DMG file. Also you can use the repos from "github":

    P.S. Thanks for the crash report. I'll check it.

  • Hi Shav: I have cloned and built the project. As shown,

    ! Shot)!

    But the app just continues to run an run and never generates a script.
    I have made up values for the 2 certs and the entitlements path. Not sure if I understand the entitlements purpose, so this is probably wrong.

    Is there something here that you can see that's amiss?

    (Project built on the first go, you got to love git).

  • Hi gbgsoft,

    For now you need to set real certificates because application used them to add codesign to your app and all plugins/libs/frameworks. This needs to open application as certificated on another Mac.

    Now I trying implement code to remove this requirements (certivicates). Give me a few time and I commit the new version. Thanks for you help to create this app :-)

  • Hi Shav: I await the next build. In the interim, I shall start the process if getting certs from Apple.

  • Hi Shav. Used the new build and found a couple of issues. The function getQtFolder() was not returning the correct folder, which I corrected as per below:

    QString QmdSettings::getQtFolder()
    m_qtFolder =getenv("QTDIR");
    return m_qtFolder;

    Once corrected the app ran through to completion. Here are the scripts it generated:

    "/Users/user/Qt5.3.1/5.3/clang_64/bin/macdeployqt" ("/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/", "-verbose=1", "-qmldir=/Users/user/Documents/vcpp/qtquick/canvas_eagles", "-executable=/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/")

    "rm" ("-rf", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/")

    "ls" ("-al", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/")

    "chmod" ("+x", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/")

    "sh" ("/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/")

    "rm" ("-rf", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/")

    My app when run reports that it is unable to locate the several files, so obvisously the qmldir param in the first script is wrong. In your app, I pointed to the folder containing main.qml, but there are other folders containing qml files. What should those -qmldir parameters look like?

    Application output from my app.
    rc:///main.qml:4 module "QtQuick.Controls" is not installed
    qrc:///main.qml:5 module "QtQuick.Window" is not installed
    qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed
    qrc:///main.qml:3 module "QtQuick" is not installed
    qrc:///main.qml:4 module "QtQuick.Controls" is not installed
    qrc:///main.qml:5 module "QtQuick.Window" is not installed
    qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed
    qrc:///main.qml:3 module "QtQuick" is not installed
    qrc:///main.qml:4 module "QtQuick.Controls" is not installed
    qrc:///main.qml:5 module "QtQuick.Window" is not installed
    qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed

  • Hi gbgsoft,

    Function getenv(“QTDIR”) works only when you build your app in debug/release mode. But if you close app and try to load your app as user (not from QtCreator) you can't get result of call getenv(“QTDIR”).

    About issues:

    1. Why in your script all commands have the symbol (")? In my code I didn't see this symbol in command name. The script must looks like this:
      /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/bin/macdeployqt /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/ -verbose=1 -executable=/Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      rm -rf /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtCore.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtGui.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtNetwork.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtPrintSupport.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtQml.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtQuick.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtWidgets.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/
      dsymutil /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/ -o /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/

    2. You must select root folder of all your QML files. More information "here":

    P.S. Also I've found critical bug with app. When I added the codesing to app with my certificate the application can't run subprocess (and all functions doesn't work) for now I don't know how fix this bug. I need more time to research some solution for this.

  • Hi Shav - I think the extra symbol (") came as a result of me just copying the qDebug() output.

    My folder was the root one of the app.

    WRT the QtDir, I note your answer, but in the original form it was pulling my applications root folder, not Qt's.

    Let me know when you've got a new build, I'll pull your changes from git and give it another whirl.

    Thanks for your support. It is appreciated.

  • Hi gbgsoft,

    Please update your copy from repo. But I still have a problem with certificated version of app.

  • Holy crap, shav, you made my day !
    I was experiencing the macdeployqt problem and was googling for a solution and found this thread.
    Download your source, used it and my app now works on a non-Qt Mac !

    THANK YOU !!!!


  • You are welcome!

    P.S. If you find issues post here.

  • Hi Shav: I downloaded from the latest commit in the repo. The program works just fine, if non-qml programs are used but shows the same QML errors as before, my app can't find the Qt Quick modules. Is there some output I could trap for you from the console. Alternatively I could put the app in question into Gitorious and you could pull a copy and see for yourself. Thanks.

  • Hi gbgsoft,

    As I remember your app using the Qt Quick right? If so you need to set QML files folder. It's need because macdeployqt will analyse your QML's files and found plugins which will be coped to your app bundle. If you doesn't set QML files macdeployqt tool doesn't copy any QtQuick plugins to your app and you will see the errors about "can’t find the Qt Quick modules". I think you should set QML files in app.

    I've added docs about my tool. You can find it "here": If you find some issues in doc let me know.


  • Hi Shav: yes I'm using Qt Quick. The path I am specifying is the path to my applications source folder. This folder contains main.qml and other qml files. There is also a sub-folder which also contains qml files. Should I be specifying the path to the qml files or the fully qualified path to main.qml itself?

    e,g, ....myapp/src/main.qml

  • In your case path must be like myapp/src/

  • Hi Shave: I have successfully deployed 2 applications using your tool: one pure desktop and and other a Qt Quick application. However when I try to deploy the app that lead to my original post, the QML foldes Are not copied to I don't even think it's finding main.qml. I'd like to get to the bottom of this. Is there any thing that you can suggest?

  • Hi gbgsoft!

    My tool used macdeployqt tool form Qt. This tool copy libs, frameworks to application bundle. But for QML the tool copy special plugins. If you see folder <you_app_name>.app/Contents/Resources/qml you can see some folders. Inside of folders you can find dynamic libs of QtQuick.

    So when you set the QML path in my tool this options said to macdeplyoyqt about copy QtQuick plugins to your application bundle.

    If you want read more about deploy try to read "this article":

    By the way in your application you use Qt resource to save QML files?

  • [solved] Hi Shav: I found what the problem was. There was a vestige of an old qml file in the root folder of the project. Once I deleted that file, everything worked as it should

  • Cool! Could you add "Solved" to title of thread?

  • Hi Shav: I forgot to mention that when you include a QML folder and ask the app to save the script, the -qmldir parameter does not get saved to the script. Thanks again for your help.

Log in to reply