Qt 5.4 cannot set app icon on OSX

狂风中的少年 提交于 2019-12-24 16:55:11

问题


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

回答1:


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.


来源:https://stackoverflow.com/questions/29329641/qt-5-4-cannot-set-app-icon-on-osx

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!