Set icon to qtquick application in OS X

  • Hi guys

    I'm trying to put my icon app and it doesn't work... i had read "here": an "this topic": , but i'm using OSX.

    my main.cpp is this:

    @qint32 main(qint32 argc, char *argv[])
    QApplication app(argc, argv);
    QQmlApplicationEngine engine;

    engine.rootContext()->setContextProperty("systemControler", new System);
    qmlRegisterType<System>("System", 1, 0, "System");
    QObject *topLevel = engine.rootObjects().value(0);
    QQuickWindow *win = qobject_cast<QQuickWindow*>(topLevel);
    return app.exec();


    and I had added this line to my .pro file as the guide sad:

    @ICON = adviser.icns@

    I had checked inside the file and in my Resources folder i had the icon, but in the dock it doesn't appear and the file hasn't the icon...

    where is my error guys ??

    best regards


  • Hi,

    Did you try to move you icon file to folder where you .pro file is saved? Also you must check the plist file. If you want to use custom plist file you must add this line to you pro file:
    QMAKE_INFO_PLIST = Info.plist

    In plist file must have this lines:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
    <plist version="1.0">
    <string>Created by ...</string>

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.