Fixing a weird problem where macdeployqt drops icons from app bundle

Qt has a great tool for building self contained application bundles on OSX, it’s called “macdeployqt”. Though I recently had a really weird bug while using it. When I ran the application normally everything was fine, but once I used the macdeployqt all the icons were missing. After a while investigating this I realized not all types of icons were affected, SVGs wouldn’t show, yet JPGs would. Long story short, you have to explicitly declare the use of the SVG module (or any other module you use) inside the project file so it ends up in the final bundle.

tl;dr:
QT += svg

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>