billypom

Enabling default dark mode for Qt Apps on Linux

2025-03-26

I'm tired of being flashbanged by Qt Designer!!!

Let's fix that

Environment

Note that this is my environment - your mileage may vary.

  • OS: Debian 12
  • DE: GNOME
  • WM: wayland

Solution

Install the Adwaita Qt theme.

sudo apt install adwaita-qt

Test it out by using the QT_STYLE_OVERRIDE environment variable when executing the program

QT_STYLE_OVERRIDE=Adwaita-Dark designer

To apply dark mode by default, add the environment variable to ~/.profile, or your favorite startup file like ~/.bashrc or ~/.bash_aliases.

echo "export QT_STYLE_OVERRIDE=Adwaita-Dark" >> ~/.profile

Restart your shell, or log out and back in.

Open a Qt application, and you should get dark mode by default!

:)

#qt
#dark mode
#linux