Toggle to Dark mode for QT applications in Fedora 41

I would like to toggle to Dark mode (when I wish to do it) for QT applications in Fedora 41 so that I can do it from terminal.

Example: calibre

Also for various versions of QT (e.g. v5, v6 etc.)

Also for nemo file manager: linuxmint/nemo: File browser for Cinnamon (not sure if it uses GTK3 or GTK4)

1 Like

Switching between light and dark modes in GNOME:

# Light mode
gsettings set org.gnome.desktop.interface color-scheme "default"
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita"

# Dark mode
gsettings set org.gnome.desktop.interface color-scheme "prefer-dark"
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark"

Some apps require these packages:

sudo dnf install gnome-themes-extra \
    qadwaitadecorations-qt{5,6} qt{5,6}-qtwayland

It depends on the specific app: Calibre - Qt6, Nemo - GTK3, etc.

You can also sync modes for modern and legacy apps:
Geany not changing to dark mode - #6 by vgaetera

3 Likes

This command helped me a lot.

There’s a Qt application called Frescobaldi which can find the Adwaita-Dark theme only when run as flatpak; if you run it as normal app Adwaita-dark theme is not found.

The color-scheme setting can be easily switched on/off also in the top right settings, but it affects only the window main bar. The gtk-theme cannot be set elsewhere and it’s what I was missing to toggle dark mode.