KConfigXT generated class gets value from kdeglobals config file

George Florea Banus georgefb899 at gmail.com
Sun Aug 8 23:15:44 BST 2021

On 09.08.2021 00:25, Carl Schwan wrote:
> Hi,
> when creating a KSharedConfig, you can specify if kdeglobals will be
> read and then you can tell KConfigXT that you want to read from an
> existing KSharedPtr:https://api.kde.org/frameworks/kconfig/html/kconfig_compiler.html

Thanks, I'll have a look.

> On another note, for color scheme handling in a QML app, this is how
> I did it in NeoChat:https://invent.kde.org/network/neochat/-/blob/master/imports/NeoChat/Settings/ColorScheme.qml
> andhttps://invent.kde.org/network/neochat/-/blob/master/src/colorschemer.h
> This allows the user to override the color scheme while using by default
> the system theme.

That's not that different from what I'm doing at the moment



And on my system NeoChat has the same problem, Config.colorScheme is 
also read from kdeglobals.

In my case it is BreezeLight, but in the combobox it's called Breeze 
Light (with a space) resulting in currentIndex being -1, thus there is 
no selection for the combobox.

> Cheers,
> Carl

More information about the kde-devel mailing list