1

I have simple Qt program. I have figured out how to use macdeployqt for deploying my app on macbooks without qt installed. But after installation from dmg (it is created using macdeployqt with -dmg option) no resources are displayed.

I added resources to project like this enter image description here

It displays correctly if I simply put the app bundle from build to my program folder, but it is missing after deploying. What have I done wrong?

Ilya
  • 5,377
  • 2
  • 18
  • 33
busylee
  • 2,540
  • 1
  • 16
  • 35
  • In principle resources are converted by the `rcc` program in a C++ file and compiled into the main executable. Read http://doc.qt.io/qt-5/resources.html for more informations – bibi Feb 15 '16 at 13:42
  • I have added images directly into resources folder in app bundle and it works fine. But it seems absurdly. Why QtCreator does not add it during build app bundle? – busylee Feb 15 '16 at 13:50
  • 1
    Because resource files are already inside the compiled executable. You access them programmatically via e.g. `QSvgRenderer my_bad(":/images/bad.svg");` – bibi Feb 15 '16 at 13:54

0 Answers0