[Development] KDE ColorScheme change notifications on DBus

Lisandro Damián Nicanor Pérez Meyer perezmeyer at gmail.com
Tue Apr 25 21:34:43 CEST 2023


El martes, 25 de abril de 2023 05:20:16 -03 Axel Spoerl via Development escribió:
> Good morning,
> 
> this is a call to KDE experts on this line.
> 
> In order to react to KDE color scheme changes, Qt listens to DBus for changes (under more) of the keys
> 
>   *   "ColorScheme" in org.kde.kdeglobals.General
>   *   "widgetStyle" in org.kde.kdeglobals.KDE
> 
> A DBus signal correctly received and processed by Qt would look like that:
> 
> ---snip---
> method return time=1682062165.741561 sender=org.freedesktop.DBus -> destination=:1.87 serial=50 reply_serial=89
> signal time=1682062165.742192 sender=:1.28 -> destination=(null destination) serial=38 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.impl.portal.Settings; member=Setting
> Changed
>   string "org.kde.kdeglobals.General"
>   string "ColorScheme"
>   variant       string "BreezeLight"
> ---snap---
> 
> On some systems, however, none of signals mentioned gets emitted. As a consequence, Qt doesn't notify its applications: https://bugreports.qt.io/browse/QTBUG-103093
> => I fail to reproduce the bug, so I can only assume that it a local configuration issue (e.g. Plasma only installation).
> => OTOH I can't find the spot in the KDE documentaiton, where it is defined how to reliably subscribe to changes of color scheme, widget style and the like.
> 
> Questions:
> a) In which cases are the mentioned DBus emitted or not?
> b) Could you point me at the respective spot in the KDE documentation?

Worth to mention: the same code compiled with Qt 5 just works :-/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230425/a4b16081/attachment.sig>


More information about the Development mailing list