This simple tutorial shows how to install and use Kvantum theme engine to change themes for your Qt5 and Qt6 applications in Ubuntu 20.04 and Ubuntu 23.10.
GNOME Desktop uses GTK toolkit for its applications and KDE/LxQt uses Qt toolkit instead. These apps work on each other desktop environment, but may NOT look native.
To unify the look and feel, Fedora Qt developer team has QGnomePlatform
, adwaita-qt
, and QAdwaitaDecorations
projects to make Qt apps look better in GNOME. So far, only QAdwaitaDecorations
is in active development for implementing Adwaita-like window header and border for Qt apps.
For Qt app window color, buttons, and other components, Kvantum is good choice to do the job.
Many apps have been ported to (and even built with) Qt6, but Ubuntu so far only includes the theme engine in system repositories for Qt5. So I’m here to show you how to install and use the Qt6 version.
Step 1: Install Kvantum theme engine
The popular Papirus icon theme project maintains an Ubuntu PPA that contains the Kvantum packages for both Qt5 and Qt6. So far, it supports Ubuntu 22.04 and Ubuntu 23.10 on amd64
(Intel/AMD) platforms.
1. First, press Ctrl+Alt+T
on keyboard to open terminal. When it opens, run command to add the PPA:
sudo add-apt-repository ppa:papirus/papirus
Type user password (no asterisk feedback) when it asks and hit Enter to continue.
2. After adding the PPA, Linux Mint user needs to manually refresh system package cache (it’s automatically done in Ubuntu while adding PPA).
sudo apt update
3. Finally, install the theme engine for both Qt5 and Qt6:
sudo apt install qt5-style-kvantum qt6-style-kvantum
Step 2: Set Environment Variable for Kvantum
Before being able to change Qt app theme through Kvantum, you may either run command to set the environment variable:
export QT_STYLE_OVERRIDE=kvantum
After that, any Qt5/Qt6 apps start from command line in this terminal window will take use the Kvantum theme engine.
To make it permanently, open Home folder, press Ctrl+H to view hidden files and folders. Then, click edit the .profile file, and add new line below in the end:
export QT_STYLE_OVERRIDE=kvantum
For Fedora, Arch, etc, edit .bash_profile
or .bash_login
file instead. You may add new line export QT_QPA_PLATFORM=xcb
for Gnome style header.
Finally, log out and back in to apply change.
Step 3: use Kvantum to change theme
Now, you can search for and open kvantnum manager
from either start menu or ‘Activities’ overview depends on your desktop environment.
Finally, go to “Change/Delete Theme” page to select a theme for your Qt apps, and navigate to “Configure Active Theme” page for more detailed options for current them.
The changes apply immediately in the “Kvantum Manager” app window, but other Qt apps need a restart to apply.
Uninstall:
To remove the theme engine, open terminal (Ctrl+Alt+T) and run command:
sudo apt remove --autoremove qt*-style-kvantum
Also remove the Ubuntu PPA by running command:
sudo add-apt-repository --remove ppa:papirus/papirus
You may also remove the export
line in the end of .profile
file.