Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. could not find or load the Qt platform plugin "cocoa".

could not find or load the Qt platform plugin "cocoa".

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 3 Posters 1.9k 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
    sitagy
    wrote on last edited by
    #1

    I am trying to run an application which is based on Qt.framework. But I get an error saying "This application failed to start because it could not find or load the Qt platform plugin cocoa". I think the cocoa plugin is under Qt5.5/plugins/platforms. Redirecting the path also did not work. What should I be doing?.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bsomervi
      wrote on last edited by bsomervi
      #2

      When developing, Qt plugins are picked up at run time from the Qt development environment. When an application is deployed the plugins required by it must be included with the application. The qt.conf file can be used to specify the location of the plugins relative to application executable.

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

        Hi and welcome to devnet,

        To deploy application on OS X, you can use the macdeployqt tool that should build your bundle with all that's needed for your application.

        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
        • B bsomervi

          When developing, Qt plugins are picked up at run time from the Qt development environment. When an application is deployed the plugins required by it must be included with the application. The qt.conf file can be used to specify the location of the plugins relative to application executable.

          S Offline
          S Offline
          sitagy
          wrote on last edited by
          #4

          @bsomervi said:

          qt.conf file

          Thank you for replying. Its actually an exec file. So I won't be able to access the qt.conf file? Is there any other way? Thanks in advance

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bsomervi
            wrote on last edited by
            #5

            qt.conf is a run time configuration file used by the Qt framework libraries, one of the configuration items is the location of the Qt plugins. You do not access the qt.conf file, you provide it to tell Qt where to find its plugins.

            As SGaist says above macdeplyqt is a tool that works with qmake to make a package suitable for deployment on OS X.

            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