Qt 5.4 cannot set app icon on OSX

2019-08-06 13:08发布

I'm having issues with setting an app icon when using Qt 5.4. I followed what this page says: http://doc.qt.io/qt-5/appicon.html#setting-the-application-icon-on-os-x but nothing works. When browsing .app's contents, there's not even a .plist file! Am I doing something wrong?

Edit: adding .pro file

QT       += core gui multimedia
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = Congolexicomatiseur
TEMPLATE = app


SOURCES += main.cpp\
    dialog.cpp \
    clickablehollowlabel.cpp \
    about.cpp \
    clickablelabel.cpp

HEADERS  += dialog.h \
    clickablehollowlabel.h \
    about.h \
    clickablelabel.h

FORMS    += dialog.ui \
    about.ui

RESOURCES += \
    resources.qrc

ICON = img/icon.icns
RC_ICONS = img/icon.ico

标签: macos qt icons
1条回答
劫难
2楼-- · 2019-08-06 13:39

Randomly found out that Qt, even when uninstalled, keeps setting files hidden somewhere: Where does QtCreator save its settings?

To solve the problem:

  • uninstall Qt
  • delete these files
  • reinstall Qt.
查看更多
登录 后发表回答