Help with QT theme

Hey guys, any help would be appreciated on this as I’ve been banging my head against the wall for days. I use Picard to tag audo files with the correct metadata. It is from my understanding a QT application, but on my Gentoo install it pulls in my GTK theme. On NixOS, with virtually the same WM, shell, theme and environment variables, the application does not respect my GTK theme and opens in a blindingly white window (seriously one of the whitest whites you’ll ever see). It does not have a “dark” mode and relies on the systems theme.

I have a very small amount of environment variables set on both devices, mostly to make niri and gtk work correctly. To my knowledge I did not configure anything different on Gentoo, but when I do env | grep -E 'QT_' I see:

QT_QPA_PLATFORMTHEME=gtk3 (I set this for niri)
QT_STYLE_OVERRIDE=Fusion
QT_QUICK_CONTROLS_STYLE=Material

I tried to replicate this on both the system level and user level on NixOS with environment.variables = <variables> and through home.sessionVariables = <variables>, but no dice. I thought maybe it’s because of missing qt libraries, which I added with pkgs.libsForQt5.qtbase & libsForQt5.qtstyleplugins which did not resolve the issue. When I run picard and grep the relevant variables, I do see that they now match gentoo’s, but its still white. I also found that Picard thought my theme was Adwaita, which doesn’t make any sense because I haven’t set Adwaita as a theme anywhere. All of my GTK apps respect my theme. If I need to wrap picard with a dark theme I guess I can do that but feel like theres something I’m missing here.

Config: sensei/nixos: My NixOS configuration for workstations. - Codeberg.org

Relevant modules: baseline.nix, niri.nix
Relevant home files: common.nix, niri.nix

Relevant machines are the configs for devices/{laptop/prometheus,desktop/erebos}. Many thanks

Gentoo Picard version: 3.0.0a1
NixOS Picard version: 2.13.3

NixOS:

Gentoo:

Sorry for a dumb question, but did you try the same (nightly?) version on NixOS? Perhaps they have fixed the theming on their end.

I will try this, looking through the nix pkgs source it looks like it uses pyqt and qt5 whereas nightly build uses qt6. seems as though it may be the version but I will report back

Sorry for the late response, I’m on unstable and the beta version of Picard I use on Gentoo isn’t yet on unstable, and I couldn’t figure out how to test a build of a beta through a shell.

Ended up just enabling qt and setting the platform theme in HM to Fusion and using qt5ct to set it to my theme. It’s not my favorite solution as its imperative, but it’s better than nothing. If any qt experts know how I can make my qt style declarative I’m all ears, I couldn’t find any solid ways to get it done