There's no proper replacement for KIcon

Allan Sandfeld Jensen kde at carewolf.com
Fri Sep 12 10:04:38 UTC 2014


On Wednesday 03 September 2014, Albert Astals Cid wrote:
> Porting guide lies in saying that KIcon should be replaced with
> QIcon::fromTheme since KIcon defauted to oxygen icon theme and obviously
> QIcon::fromTheme doesn't do that.
> 
> Please someone provide a solution for this problem or undeprecate KIcon.
> This is blocking the porting of my applications.
> 
Is there a problem with using QIcon::setThemeName("Oxygen")? It you want to 
use the system defined theme Qt needs to detect the desktop platform and at 
least the KDE platform theme already defaults to Oxygen. 

If that is not enough, it might be possible to add some kind of QIcon fallback 
theme setting.

`Allan


More information about the Kde-frameworks-devel mailing list