Qt World Summit: Submit your Presentation

Qt platform plugin "cocoa"

  • Hello !

    I am knew to Qt and trying to get my first UI to work !
    However, when i try to run my code i get a "This application failed to start because it could not find or load the Qt platform plugin "cocoa"
    in "". " error message.
    The debugging process of Qt seems to indicate it comes from the Application but i dont know much more.

    I spent hours trying to fix it but nothing works. I am on MacOS.

    #include "mainwindow.h"
    #include <QApplication>
    int main(int argc, char *argv[])
        QApplication a(argc, argv);
        MainWindow w;
        return a.exec();

  • Hi, and welcome to the Qt forum! What's your Qt version number?

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    To add to @Wieland, are you getting that problem while running your application outside Qt Creator ?

Log in to reply