KDE theme colors API for QML

Денис Купляков dener.kup at gmail.com
Sun Aug 25 22:45:29 BST 2013


> Yes, changing the KColorScheme ABI is not possible for 4.x, you may want to
> take this to kde-frameworks-devel for 5.x though.
>
> Regarding your problem, have you tried something like
>
>
> #include "kcolorscheme.h"
>
> class ColorSchemeWrapper : public QObject {
>  Q_OBJECT
>  Q_ENUMS(ColorSet)
> public:
>     enum ColorSet {
>         View = KColorSchme::View, // Keeps enum values in sync!
>         Window = KColorSchme::Window,
>         Button = KColorSchme::Button,
>         Selection = KColorSchme::Selection,
>         Tooltip = KColorSchme::Tooltip
>     };
> };
>
> ?
>
> That should help, it's a bit of a pain, but probably is your only option at
> the moment.
>
> Cheers,
>   Albert
>

Thanks, this looks good! But I don't really need many colors at my
current project, so I will make a patch to KF5 as recent as I finish
the second part of my GSoC project. With a patch to KF5 to access
colors I will also post QML impelementation of KGamePopupItem.




More information about the kde-core-devel mailing list