Linux has a large assortment of open source applications written with a ton of different toolkits. These toolkits are often referred to by name in the community (GTK and Qt). These two frameworks look vastly different from each other, and it causes some inconsistencies within desktop themes. Over the years many have tried to solve this. On Qt-based desktop environments (like KDE Plasma) there is a theme that makes GTK/Gnome-like applications look more at home. It turns out there’s also an effort to make Qt applications look less alien on GTK desktops as well. It’s all accomplished with the Adwaita-Qt theme.
SPOILER ALERT: Scroll down and watch the video tutorial at the end of this article.
In this article, we’ll teach you how to download and install Adwaita-Qt. Additionally, we’ll go over how to apply it for Qt applications on all modern GTK Linux desktop environments.
Start out by installing the Git package to your operating system. You’ll also need to install cmake and have the Qt framework.
sudo apt install git cmake qt5* lxqt-config
sudo apt-get install git cmake qt5* lxqt-config
sudo pacman -S git cmake qt5-base lxqt-config
sudo dnf install git cmake qtbase5-common-devel qt5-qtbase-devel lxqt-config
sudo zypper install git cmake lxqt-config sudo zypper install patterns-openSUSE-devel_qt5
The Adwaita-Qt theme on Github is uncompiled source code. As a result, it’ll run on anything with the right tools. The tools needed to compile this code are Cmake, Qt5 development libraries, and Git. Additionally, you’ll need to install the LXQt Config app, to quickly apply the theme to Qt applications.
Open up a terminal and use the package manager to search for “qt5 development”, “cmake”, “git”, and “lxqt-config”. Install these packages. If they all install successfully, you’ll be able to build the Adwaita-Qt theme correctly.
Start out the build process by using the git tool to grab the source code using clone.
git clone https://github.com/FedoraQt/adwaita-qt.git
Enter the newly cloned adwaita-qt folder using the CD command.
At this point, you’ll need to make a build folder for the Cmake builder tool. With mkdir, create the new build folder inside ~/adwaita-qt.
Move from adwaita-qt to the build sub-folder.
Use the Cmake tool to configure the code, and generate the building files.
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..
Now comes the compiling part. In the terminal, run the make command.
Running make should take a while, so let the terminal be. You’ll see lots of lines go by, as the compiler puts Adwaita-Qt together. The compiler will complete when the terminal enables you to type again.
The last part of the compiling process is installation. To install Adwaita-Qt system-wide, run the install command with sudo.
sudo make install
Alternatively, install the Adwaita-Qt theme for a single user by removing sudo. Installing the theme as a single user means that the Adwaita-Qt theme needs to be re-installed for each user that needs access to it.
Adwaita-Qt is not a GTK theme. Instead, it is Qt in nature. Since the theme is Qt and not GTK, none of the modern desktops have a way to apply it. It is because of this that earlier in the guide we installed lxqt-config. This tool is an essential part of the LXQt desktop. However, it works nearly anywhere.
Launch the LXQT-Config tool by pressing Alt + F2 and typing in lxqt-config in the prompt.
Inside the config tool, look for “Appearance” and click on it. If the Adwaita-Qt theme built correctly, it should show up in the list. Click on it to tell the system to use it as the default Qt skin.
Note: you may need to restart your PC for the changes to take full effect.
After the config tool applies the skin, launch an application on your Linux desktop that uses Qt and not GTK. Confirm it’s using the correct theme. If the theme fails to apply, go back to lxqt-config and try again.
Disable The Theme
Adwaita-Qt does an excellent job at making Qt applications look less out of place on desktop environments like Gnome Shell, Cinnamon, etc. Still, if you’re not a huge fan of this theme, it’s understandable. Not many people choose to stick with the Adwaita theme in favor of a custom one. If you’d like to disable the theme, it’s as easy as going back into lxqt-config.
Once inside, select the “Appearance” button, just like last time. To disable the theme, select a different one (that isn’t Adwaita-Qt) to “disable it.” Then, open up a terminal and delete the source-code from your home folder.
rm -rf ~/adwaita-qt
After switching off the theme in lxqt-config, Qt applications should no longer be using Adwaita-Qt.