QIcon::fromTheme
Albert Astals Cid
aacid at kde.org
Sun May 24 04:38:09 BST 2015
El Dissabte, 23 de maig de 2015, a les 19:45:57, Jeremy Whiting va escriure:
> Hello all,
>
> I'm confused about how QIcon::fromTheme works (or maybe how it's
> supposed to work?) I've got Kmouth frameworks branch built and
> installed into /usr/local on two different machines. In both cases it
> installs phrase.png and phrasebook.png icons into
> /usr/local/share/icons/hicolor/XxY/actions and XDG_DATA_DIRS is set so
> QIcon::themeSearchPaths is giving /usr/local/share as one of the paths
> it is searching. Yet QIcon::fromTheme(QLatin1String("phrase")) gives
> no icon unless I copy the icon from
> /usr/local/share/icons/hicolor/32x32/actions/ to
> /usr/share/icons/hicolor/32x32/actions. I looked a bit in qicon.cpp
> itself to see how it's doing that. and it's using some QIconEngine. Is
> that creating an instance of our KIconEngine because the
> frameworkintegration platformtheme gives that for it's
> createIconEngine method? Is this a bug in KIconEngine itself that it's
> not searching the XDG paths specified by the icon spec? Any hints
> would be appreciated.
Do you have a theme definition in /usr/local/share/icons/hicolor ? Probaby
not, so when loading the icon from your theme (breeze, oxygen, whatever) that
is most probably in /usr/share/icons/, why would the code fall back to a
different "hicolor" theme?
I understand what you want but i don't think icon themes work like that.
Cheers,
Albert
>
> thanks,
> Jeremy
More information about the kde-core-devel
mailing list