could not find or load the Qt platform plugin "cocoa".
-
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?.
-
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.
-
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.
-
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.