I'm trying to automate the process of theming QT5 programs, in the absence of a DE like KDE, by writing a script that does it. I know that GTK has a bunch of config files that can specify all the aspects of a theme, but what's the equivalent for QT5?

So far, I've found out that I can set QT_THEME_OVERRIDE to set the theme, and XCURSOR_THEME to set the cursor theme (QT5 appears to respect this). But what about the icon theme and everything else?

I've also seen this Arch Wiki section about a similar issue, and a few other questions that suggest using the graphical configurator qt5ct, but I'm really trying to write something that makes this change, rather than have a configurator do it, so that I don't have to repeat this process if I replicate my system install somewhere else.

(This is so I can write a .nix expression for home-manager that can handle qt5 theming declaratively, but that's beside the point.)


If you still care about this, check out my config. I am using nix & home-manager as well, so this might be useful. (Though this doesn't quite work for nixos-unstable right now because pure-qt apps don't use correct icon theme. I don't know what to do). You should do something like xdg.configFile."kdeglobals".text = kde; where kde is defined above.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.