Themed icons on Windows

Nicolás Alvarez nicolas.alvarez at gmail.com
Mon May 26 01:05:18 UTC 2014


The QIcon::fromTheme documentation says:
"By default, only X11 will support themed icons. In order to use
themed icons on Mac and Windows, you will have to bundle a compliant
theme in one of your themeSearchPaths and set the appropriate
themeName."

I can confirm this; Okteta5 doesn't show icons on Windows. To make it
work I added QIcon::setThemeName("oxygen"); and a hardcoded path in
setThemeSearchPaths after creating the QApplication, but that's a
hack...

How do we solve this properly? Having the KDE-Windows team patch every
app to add setThemeSearchPaths is...certainly an option, but far from
the best one :)

Put the setThemeName and setThemeSearchPaths in a kguiaddons /
kiconthemes / someframework function and have every KDE app call it?
Make KDE-on-Windows use a patched or different QPA with a modified
QPlatformTheme::themeHint? Other ideas?

-- 
Nicolás


More information about the Kde-frameworks-devel mailing list