QT theme search paths limited on Windows
Christoph Cullmann
cullmann at absint.com
Thu Jun 30 06:14:19 UTC 2016
Hi,
I think it is better to just bundle the custom items in a resource file,
that will work on all operating systems, even on Mac, and has no real drawbacks.
Greetings
Christoph
----- Am 30. Jun 2016 um 0:23 schrieb Jasem Mutlaq mutlaqja at ikarustech.com:
> Hello,
>
> KStars has problems loading custom icons that were installed into the "hicolor"
> theme under Windows. On Linux, it works perfectly fine. Upon checking
> QIcon::themeSearchPaths(), turns out on LInux it's the following:
>
> Theme search path ("/usr/share/icons", "/usr/share/pixmaps", ":/icons")
>
> But on Windows, it's only ":/icons"
>
> I solved by adding the theme names manually under Windows:
>
> QStringList searchPaths = QIcon::themeSearchPaths();
> foreach(QString path,
> QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation))
> searchPaths << QString("%1/%2").arg(path).arg("icons");
> QIcon::setThemeSearchPaths(searchPaths);
>
> After that, the icons under "hicolor" loaded up fine. Perhaps Qt should be
> patched to add those paths so that all KDE applications can access them without
> the above hack?
>
> --
> Best Regards,
> Jasem Mutlaq
>
>
> _______________________________________________
> Kde-windows mailing list
> Kde-windows at kde.org
> https://mail.kde.org/mailman/listinfo/kde-windows
--
----------------------------- Dr.-Ing. Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH Email: cullmann at AbsInt.com
Science Park 1 Tel: +49-681-38360-22
66123 Saarbrücken Fax: +49-681-38360-20
GERMANY WWW: http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234
More information about the Kde-windows
mailing list