[Qt-interest] Default (themed) icons?
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Wed May 20 15:18:01 CEST 2009
Ole Streicher wrote on Wednesday, May 20, 2009 12:28 PM:
> Hi,
>
> For toolbars etc. I want to use existing default icons as far as
> possible (f.e. for zoom actions). Under Linux, they are under
>
> /usr/share/icons/default.kde4/22x22/actions/
Are you sure?! To which Linux distribution are you referring to? ;)
> but it is not portable to write this path to my application.
Sure not :)
> How can I solve this in a portable way?
First off, there is no such thing as a "standard icon set"! Have a look even at different Windows apps alone, they are most likely to use different icons even for common actions such as "Find", "New Document", "Copy" etc., left alone different icon sets between KDE and Gnome, and I don't even want to start mentioning "Icon Themes" you can install for every little tiny app nowadays ;)
Admittedly the icons for "standard" operations such as "Save", "Open" etc. look more and more the same among applications, so the best way to solve this is to "collect" (read: "strategically re-use") the bunch of icons you like, put them into a Qt resource bundle and use those on all platforms.
I understand your question probably aims more towards to "how do I get access to standard icons on {Windows|MacOS X|Linux|...}, but at least on Windows I am not aware of a "default place" where to look for icons. I know there are several system DLLs which contain a bunch of colourful icons which you could extract (with platform-dependent code, off course) at runtime, but not sure if this worth the effort.
OpenOffice for example uses the same icons on every platform, AFAIK (it is "themeable" though, so Linux distros are free to provide their own icons which match the given desktop manager or so...)
Cheers, Oliver
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list