App not respecting dark theme after system update

This worked, thanks to ToZ at the Xfce forum:
https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications

QGtkStyle

Note: QGtkStyle has been removed from qt5-base 5.7.0 [1] and added to qt5-stylepluginsAUR [2]

Warning: Depending on GTK 2 theme, this style may cause rendering issues such as transparent fonts or inconsistent widgets.

This Qt style uses GTK 2 to render all components to blend in with GNOME and similar GTK based environments. Beginning with Qt 4.5, this style is included in Qt. It requires gtk2 to be installed and configured.

This is the default Qt4 style in Cinnamon, GNOME and Xfce, and the default Qt5 style in Cinnamon, GNOME, MATE, LXDE and Xfce. In other environments:

  • For Qt4, it can be enabled with Qt Configuration (qtconfig-qt4), choose GTK under Appearance > GUI Style. Alternatively, edit the /etc/xdg/Trolltech.conf (system-wide) or ~/.config/Trolltech.conf (user-specific) file:

~/.config/Trolltech.conf

... [Qt] style=GTK+ ...

  • For Qt 5, it can be enabled by installing qt5-stylepluginsAUR and setting the following environment variable: QT_QPA_PLATFORMTHEME=gtk2

  • For Qt 6, it can be enabled by installing qt6gtk2AUR and choosing the qt6gtk2 style in qt6ct, or alternatively setting the following environment variable: QT_QPA_PLATFORMTHEME=gtk2

For full uniformity, make sure that the configured GTK theme supports both GTK 2 and GTK 3. If your preferred theme has inconsistent rendering after configuring Qt to use GTK2, install gtk-theme-switch2AUR and choose a theme.

4 Likes