Results 1 to 4 of 4

Thread: where are my icons?

  1. #1
    Join Date
    Feb 2013
    Posts
    31
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default where are my icons?

    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

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: where are my icons?

    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()

  3. #3
    Join Date
    Feb 2013
    Posts
    31
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where are my icons?

    All my icons are *.png files and all are included into *.qrc file, other toolbars I emphasize work normal!?

  4. #4
    Join Date
    Feb 2013
    Posts
    31
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: where are my icons?

    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

Similar Threads

  1. Replies: 2
    Last Post: 8th April 2013, 07:40
  2. Where have all the icons gone?
    By gib in forum Qt Programming
    Replies: 7
    Last Post: 6th September 2010, 09:19
  3. no icons in menu
    By maverick_pol in forum Qt Programming
    Replies: 1
    Last Post: 14th May 2009, 21:09
  4. Where to get Icons from
    By pospiech in forum General Discussion
    Replies: 4
    Last Post: 19th December 2008, 22:14
  5. how to add icons to QTreeWidget?
    By wei243 in forum Qt Programming
    Replies: 4
    Last Post: 21st September 2007, 09:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.