PDA

View Full Version : where are my icons?



radmir
28th July 2014, 18:51
Hi, All,

Met one strange case:

I've built a Qt app, add toolbar, placed some icons (png files), built debug version, all is OK, tooltips, icons, and so on,
but release version doesn't show icons, only empty squares, how this can be?
Qt 4.8.2, Win XP, msvc2010, creator 2.5.2. - release version also doesn't show tooltip for this toolbar, other toolbars work normal.
Also all work good under Linux/Qt 4.8.4.

Any help would be appreciated.

Radmir

ChrisW67
28th July 2014, 21:45
Here is one way, but we cannot be sure what you have done.

Your icons are sitting on the file system and the path to your icons is probably relative. The release version is running with a different current working directory so the relative path no longer finds the icon. Look at using the Qt resource system to embed the icons in the exe or locate the icons using QCoreApplication::applicationDirPath()

radmir
29th July 2014, 04:10
All my icons are *.png files and all are included into *.qrc file, other toolbars I emphasize work normal!?

radmir
29th July 2014, 17:06
Thanks a lot for discussing,

The reason is: different resource' capacities in debug contra release versions of a program. I have 77 icons, so the solution is to make two resource files instead one, that helped.
The problem is closed.
Yours,
Radmir