How to Change Look and Feel of Qt5 Apps in Ubuntu, Debian, Fedora Linux

Users may change the theme of Qt apps separately, so they will look native on GTK based systems.

Users may change the theme of Qt apps separately, so they will look native on GTK based systems.

Qt apps, e.g., VLC, SMPlayer, VirtualBox and Avidemux, look ugly on GNOME Desktop. Here’s how to change the theme for these Qt apps, so they will look more native.

In Ubuntu, Debian, Fedora and other Linux with Gnome desktop, the Qt apps do not inherit the system GTK theme. When you choose another theme via Gnome Tweaks, it changes only header bar and window border for these apps, leaves other components, e.g, color scheme, menus, unchanged.

To make them look good on Gnome desktop, Kvantum theme engine is present to change the look and feel of Qt apps.

GTK and Qt:

Both GTK and Qt are widget toolkits for creating graphical user interface for applications. While GTK is a free and open-source project, Qt is available under both commercial licenses and open-source GPL 2.0, GPL 3.0, and LGPL 3.0 licenses.

GNU/Linux tends to be more GTK oriented than Qt, and the former is more commonly used. However, KDE as well as many popular projects use Qt for their apps, such as, VLC, Oracle VirtualBox, Kid3 audio tagger, openshot, etc.

Kvantum

Since a GTK theme does not apply fully to Qt apps, the Kvantum theme engine is present to do the job for you.

It provides a Kvantum Manager app for you to choose a theme to apply for all Qt apps on Linux. For instance, the “KvYaru” theme make Qt apps look more native in Ubuntu 20.04 and higher.

Choose Qt theme

The app also provides numerous options to tweak the appearance of the current theme, such as transparent view, respect dark themes, apply contrast effect, translucent windows, change size of icons & buttons, layout margin, and more! Each option has tool-tip. Just move mouse cursor over, and it will tell what does it do.

tweak Qt theme options

It also possible to assign theme to specific applications. Under “Application Themes” tab, choose a theme as you prefer, then type your desired apps (executable commands) separated with commas. And finally click save to apply them.

Apply theme for specific applications

The app has a few dozens of themes by default. You may get more themes from this page. And, the first app tab offers option to make it easy to install these themes.

Install Qt Themes

How to Install Kvantum in Linux:

Press Windows (or Super) key on keyboard to bring up overview screen, then search for and open “terminal”. When it opens, run one of the commands below for your system to install the Kvantum engine.

Install Kvantum in Ubuntu / Debian

For Ubuntu 20.04 + and Debian based systems, run the single command to install the package:

sudo apt install qt5-style-kvantum qt5-style-kvantum-themes

While the packages in official repositories are always old, you can install the most recent version from this Ubuntu PPA. To do so, run the commands below one by one:

sudo add-apt-repository ppa:papirus/papirus
sudo apt update
sudo apt install qt5-style-kvantum

Install Kvantum in Fedora / CentOS8

For the Fedora based systems, the package name is different. Simply open terminal and run the command below will install the theme engine:

sudo dnf install kvantum

Install Kvantum in Arch Linux / Manjaro

The Manjaro Gnome has the package installed out-of-the-box. You may launch it directly by searching from the overview screen. For Arch Linux, use command to install it:

sudo pacman -S kvantum-qt5

Install Kvantum in openSUSE:

For openSUSE Linux, run command in terminal to install the “kvantum-manager” will get the theme engine:

sudo zypper install kvantum-manager

Setup Kvantum:

To make the theme engine works, you need to write a rule to the configuration file for either current user only or system wide.

For single user only, open terminal and run command:

echo "export QT_STYLE_OVERRIDE=kvantum" >> ~/.profile

The command will create (if not exist) a hidden file ‘.profile‘ in user’s home directory and write the rule into the file.

For system wide, run command in terminal to edit the “/etc/environment” config file:

sudo nano /etc/environment

Type user password when it asks, no visual feedback, and hit Enter. It will open the file in terminal window. Copy and paste the rule “export QT_STYLE_OVERRIDE=kvantum” (without quotes) into the end as new line and save it.

Finally press Ctrl+X, type y, and hit Enter to save file. Log out and back in to apply change.

When everything’s done correctly, you are able to launch the Kvantum Manager and apply themes to your Qt apps.

NOTE: the Kvantum Manager app itself changes once you choose another theme. However, other Qt apps need a re-launch to apply change. That’s all. Enjoy!

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.