Dark theme is applied to not al Qt apps (have tried qt5ct and Kvantum)

I have tried applying a dark theme both through qt5ct and through Kvantum. I have added these lines to my .profile:

export QT_STYLE_OVERRIDE=kvantum

It works for most applications, but Clementine and Keepassxc stay completely “white” and Smplayer has “white” playlist.

In qt5ct I have set the theme as gtk2, and in Kvantum I have tried different themes: default, KvAdaptaDark, and Matcha-Dark/Matcha-Dark-Azul. In all the cases the aforementioned apps stay “white”.

Does anyone know what I am missing?

Remove that line.
This is the default ~/.profile taken from /etc/skel/ at installation:

export EDITOR=/fusr/bin/nano 
export QT_QPA_PLATFORMTHEME="qt5ct" 
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"

Then you set it to kvantum from Qt5Settings.


If you want to use Kvantum only, without the qt5ct aka Qt5Settings, then only use that line:

export QT_STYLE_OVERRIDE="kvantum"

Then from Kvantum Manager you set your theme.

You can have those also in the /etc/environment file, but in that case you don’t use export, but again, only one of them would suffice.

For QT_QPA_PLATFORMTHEME you can use: gnome, kde, qt5ct or xcb
For QT_STYLE_OVERRIDE is kvantum or kvantum-dark


Thanks! The advice on setting QT_QPA_PLATFORMTHEME="qt5ct" in the /etc/environment file worked.

After I made this post I found out something I didn’t pay attention before — those Qt apps that stayed “white” were the ones that I launched via rofi (a dmenu-like launcher) that in its turn was launched by a hot key from sxhkd (a hotkey manager); while the Qt apps affected by the dark theme were ones that I launched in any other way (it so happens that I usually launch some apps one or the other way). But if I launched the “problem” apps from, for example, whisker-menu, they were themed! So the problem was not in the aforementioned apps themselves, but in the fact that the apps launched via rofi were executed in a context where the variable QT_QPA_PLATFORMTHEME was not set. Probably, because rofi was launched by a hot key from sxhkd, which I load at the system start as a user systemd service?

Anyway, after I set this variable in /etc/environment, the theme got applied to all Qt apps regardless of how they are launched.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.