Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
157 views
in Technique[技术] by (71.8m points)

Why does my .icns icon not work with QT/C++ on OSX?

I made a small app that simulates a magic 8-ball in C++ using QT Creator for OSX. I set ICON += 8ball.icns in the .pro file and ran qmake through QT Creator. My app works, but it doesn't have an icon in Finder view or in the Dock. I've tried every tutorial/StackOverflow post about my problem, but I can't seem to get the icon to work. Any thoughts?

Edit, .plist file:

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>CFBundleExecutable</key>
   <string>Magic8Ball</string>
   <key>CFBundleIconFile</key>
   <string>8ball.icns</string>
   <key>CFBundleIdentifier</key>
   <string>com.yourcompany.Magic8Ball</string>
   <key>CFBundleIconFile</key>
   <string>ContentCanvas</string>
   <key>CFBundlePackageType</key>
   <string>APPL</string>
   <key>CFBundleSignature</key>
   <string>????</string>
   <key>LSMinimumSystemVersion</key>
   <string>10.13</string>
   <key>NOTE</key>
   <string>This file was generated by Qt/QMake.</string>
   <key>NSPrincipalClass</key>
   <string>NSApplication</string>
   <key>NSSupportsAutomaticGraphicsSwitching</key>
   <true/>
</dict>
</plist>
question from:https://stackoverflow.com/questions/65892473/why-does-my-icns-icon-not-work-with-qt-c-on-osx

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...