Uniform theme and fonts for Qt apps in GTK environments
The article needs help and is partly outdated! It seems with change on qt6 it needs some extra to set up for all qt applications. (10.01.2022)
By @joekamprad
There are many ways to get a uniform look and feel working, and this is only one of those that you can choose.
The easiest way to set a uniform appearance for QT applications under GTK environments is to use Kvantum and QT5CT.
Install both packages:
sudo pacman -S kvantum-qt5 qt5ct
Both applications are required because kvantum does not allow the font settings. Therefore qt5ct is also set as an environment variable, as it works in most desktop environments or when using a window manager as a user. In some cases, e.g. when using Cinnamon, it is necessary to set the variable system-wide, because Cinnamon seems to ignore variables that are set as users. Then we set qt5ct to use the kvantum theme and set fonts inside qt5ct.
Per-user variable will be configured like so:
It seems this method is not working on XFCE4 where using ~/.profile
usage is working!
Same counts for Cinnamon.
Create the needed directory
mkdir ~/.config/environment.d
and the needed config file with the needed variable:
echo "QT_QPA_PLATFORMTHEME=qt5ct" > ~/.config/environment.d/qt-theme.conf
To use ~/.profile
method:
echo "export QT_QPA_PLATFORMTHEME=qt5ct" >> ~/.profile
To set this systemwide (if per user variable does not work at all):
su
echo "QT_QPA_PLATFORMTHEME=qt5ct" >> /etc/environment
exit
If you use per user settings log out and back in to make it work, for systemwide settings reboot the system.
Now use the Apps to set your Theme, Fonts, and Icons:




Changes will work without the need to log out or reboot, only apps already running need to be restarted to take the theme changes.
Notes:
Some applications may have their own theme settings like kdenlive:

Do you want to descend into the sources of endless information and possibilities? … Consult the Archwiki:
https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications
—
Connect with us: