Please nominate your Qt Champions for 2021!

QtAssistant inside own Application bundle

  • Hi

    I am trying to get my crossplatform application to also bundle the QtAssistant for Mac, Linux and Windows.

    The QtAssistant in my application works fine under Linux and Windows, but under Mac it isn't starting.
    I used the version delivered in Qt 5.7, but it crashes immediately the error is:

    Library not loaded QtHelp
    Reason: image not found

    But the QtHelp library is available in the Frameworks folder inside the bundle.

    I get the same error when I compiled my own version of the QtAssistant and used 'macdeployqt' to fix all the dependencies.
    Is there someone who can help me to fix this problem?

    Kind regards,


  • Nevermind, reinstalling Qt 5.7.0 fixed the problem for me.
    I guess the QtHelp library was corrupt or something.

    Although it would be nice if only the Assistant executable could be in the bundle instead of the complete Assistant bundle.
    Because then there are two Framework folders containing Qt Libraries.
    Anyone know's how to do that?

  • This is the guide to get the Assitant as a executable instead of a full bundle inside your own application bundle:

    1. Copy the Assistant executable in your own Application bundle in the MacOs folder.

    2. Change the rpath to link to the Framework directory:
      install_name_tool -add_rpath '@loader_path/../Frameworks'

    3. Run the macdeployqt on your Application but also with this command:
      macdeployqt -dmg -always-overwrite

    Note: The -dmg tag is optional, please test it first without the parameter.

    1. Please make sure the Frameworks directory contains the following files:
    1. You can check where the rpath is leading with the following command:
      otool -l

    2. Make sure it returns this item:

    Load command 28
              cmd LC_RPATH
          cmdsize 40
             path @loader_path/../Frameworks (offset 12)
    1. It's possible to have multiple LC_RPATH, so don't worry if there are also others.

Log in to reply