Dark theme for QT apps in debian

Hi

I try to do dark theme in my debian template but it is not working.
I did install qt5ct and qt5-style-plugins and set env QT_QPA_PLATFORMTHEME=qt5ct
Also try many things but this did not work

I want my template to have dark theme for gtk and qt apps
What do I need to do please?

These are my configuration files.
(you may need to modify fonts, themes etc.)

QT configuration
Packages:

qt5-gtk2-platformtheme
adwaita-qt # QT5 theme
qt5ct  # QT5 configuration (proper font sizing)
adwaita-qt6  # QT6 theme
qgnomeplatform-qt5  # QT5 use gsettings

create and save as:
/etc/environment.d/62-qt.conf

export QT_STYLE_OVERRIDE=Adwaita-dark
#export QT_QPA_PLATFORMTHEME=qt5ct
export QT_QPA_PLATFORMTHEME=gtk2
#export QT_SCALE_FACTOR=1.5 
#export QT_FONT_DPI=144

For GTK2
create and save as: /etc/skel/.gtkrc-2.0

include "/usr/share/themes/Adwaita-dark/gtk-2.0/gtkrc"
style "user-font"
{
  font_name="Adwaita Sans"
}
widget_class "*" style "user-font"
gtk-font-name="Adwaita Sans 12"
gtk-theme-name="Adwaita-dark"
gtk-icon-theme-name="Adwaita"

For GTK3 and GTK4
create and save as:
/etc/skel/.config/gtk-3.0/settings.ini
/etc/skel/.config/gtk-4.0/settings.ini

[Settings]
gtk-font-name=Adwaita Sans 12
gtk-theme-name=Adwaita-dark
gtk-icon-theme-name=Adwaita
gtk-decoration-layout=menu:
gtk-application-prefer-dark-theme=1
gtk-titlebar-right-click=none
gtk-enable-event-sounds=0
gtk-enable-input-feedback-sounds=0
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintslight
gtk-xft-rgba=rgb

[AdwStyleManager]
color-scheme=ADW_COLOR_SCHEME_PREFER_DARK

GTK3 fix for AT-SPI
create and save as:
/etc/environment.d/61-gtk3fix.conf

export GTK_THEME=Adwaita-dark

# gtk3 depends on at-spi2-atk, which depends on at-spi2-core.
# at-spi2-core automatically start two processes on every boot
# (at-spi-bus-launcher and at-spi2-registryd) which are useless
# if you don't use any accessibility applications.
# the following fixes such errors:
# AT-SPI: Error retrieving accessibility bus address: ...
# ... org.freedesktop.DBus.Error.ServiceUnknown: ...
export NO_AT_BRIDGE=1

GDK_CORE_DEVICE_EVENTS
create and save as:
/etc/environment.d/60-gdk.conf

# sets the environment variable automatically even without X running.
{
  environment.variables = {
    GDK_CORE_DEVICE_EVENTS = "1";
  };
}

For XDG
create and save as:
/etc/environment.d/64-xdg.conf

XDG_CURRENT_DESKTOP=GNOME

REBOOT qube.

Should any of this affect tray icon backgrounds?

No, this is not for dom0.

But that could be an answer for you.

Sure, but what about tray icon backgrounds for programs that are running in appvms? Should your settings affect those?

Thank you very much