I am using a standalone tiling window manager QTile. In QTile I want to organize my GTK and QT Themes. For GTK theme I used a program named "lzappearance" and it works perfectly fine. But, for Qt I am using a program named as "qt5ct". On the top it is written this application is not configured correctly and when I click on the information button it says: The QT_QPA_PLATFORMTHEME environment variable is not set(required value: qt5ct). Please help and guide me on how to set qt5ct and environment variables.
Asked
Active
Viewed 2.4k times
1 Answers
10
I'll answer with a full guide to help the ones who have not gotten this far:
- Install qt5ct (
sudo pacman -S qt5ct) - You might want to install a Qt theme, that can be done by
sudo pacman -S breezefor example. - Edit
/etc/environmentas root bysudo nano /etc/environmentand add the lineQT_QPA_PLATFORMTHEME=qt5ctand save. - Log out and in (or reboot)
- Now in qt5ct you can change your theme and settings
The important part is adding QT_QPA_PLATFORMTHEME=qt5ct to /etc/environment. This makes the Qt theme redirect to qt5ct.
Also, if you want Adwaita for Qt, (as I just did for myselft) you can install adwaita-qt from AUR. (yay install adwaita-qt) It comes with all the variants (light, dark, high contrast and high contrast inverse)
tempacc
- 157
- 1
- 7
-
Hi, Thanks a lot!! Because of you now I am able to set qt themes in QTile. I digged in the Arch Wiki for qt5ct, environment variables, and the github repo of qt5ct but it did not work.Thanks once again! – Anuj Tambe Dec 08 '21 at 13:48
-
1You're welcome, I just went through the same stuff a month ago with Gnome, the documentation is not very good about this. I'm very glad to help. – tempacc Dec 08 '21 at 21:17
-
Can you set it locally instead of globally? For example `~/.config/enviroment.d/my-env.conf` works for all the vars expect this one (`QT_QPA_PLATFORMTHEME=qt5ct`). – Scorpion Jul 19 '23 at 18:04
-
@Scorpion sorry, I have no idea – tempacc Jul 20 '23 at 19:14