Back to Noctalia

GTK and Qt Applications

v5-templates-official-gtk-qt.md

latest3.9 KB
Original Source

GTK and Qt Applications

This guide covers theming applications built with GTK, Qt, and KDE Plasma toolkits.

GTK 3/4 Applications

Section titled “GTK 3/4 Applications”

GTK applications include most GNOME apps and many Linux applications. Noctalia can automatically theme them using the adw-gtk3 theme.

Setup

Section titled “Setup”

  1. Install required packages:

  2. Apply the GTK theme:

  • Using command line:

Terminal window

gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3'
  1. Enable GTK theming in Noctalia:
  • Open Settings → Templates
  • Toggle on GTK

Troubleshooting

Section titled “Troubleshooting”

  • Theme not applying: Completely restart GTK applications (close and reopen)
  • Some apps still look wrong: Some GTK apps may need GTK 4 theme separately:

Terminal window

gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3'gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' # or 'prefer-light'
  • Flatpak apps: Flatpak apps may need the theme installed in their sandbox:

Terminal window

flatpak install org.gtk.Gtk3theme.adw-gtk3-darkflatpak install org.gtk.Gtk3theme.adw-gtk3

Qt Applications

Section titled “Qt Applications”

Qt applications include KDE apps and many cross-platform applications. KDE apps (Dolphin, KDE Connect) require the use of a KColorScheme, and so this is the preferred way to theme QT applications. Use of a normal QT theme instead of a KColorScheme can cause colors to appear incorrectly or unreadable when running KDE apps. If KDE apps are not used, then the normal QT theme can be used instead.

Setup

Section titled “Setup”

  1. Install an application that allows you to apply QT/KColorScheme themes: While the setup steps will go through the process of using qt6ct-kde, there are multiple options available.

  2. Set environment variable: Add this to your window manager configuration or shell profile:

  3. Enable the KColorScheme (or QT theme) in Noctalia:

  • Open Settings → Templates
  • Toggle on KColorScheme (or Qt )
  1. Configure qt6ct:
  • Run qt6ct from terminal
  • In the Appearance tab, there will be a dropdown for “Color scheme:”
  • In the dropdown select noctalia (KColorScheme) if using a KColorScheme for KDE app compatibility, or noctalia for a normal QT theme without the need for KDE app compatibility.
  • Click Apply and OK

Troubleshooting

Section titled “Troubleshooting”

  • Qt apps not themed: Ensure the environment variable is set before launching applications
  • qt6ct not found: Make sure qt6ct is installed and in your PATH
  • Theme not updating: Restart Qt applications after changing color schemes
  • “The application is not configured correctly”: If opening qt6ct states this, it is likely that the QT_QPA_PLATFORMTHEME environment variable is not correctly set to qt6ct (Note: This may require a reboot if you set it for the first time).

KDE Plasma (KColorScheme)

Section titled “KDE Plasma (KColorScheme)”

If you’re using KDE Plasma, Noctalia can apply colors through the native KColorScheme system.

Setup

Section titled “Setup”

  1. Enable KColorScheme in Noctalia:
  • Open Settings → Templates
  • Toggle on KColorScheme
  1. Apply in KDE System Settings:
  • Open System Settings → Appearance → Colors
  • Select the noctalia color scheme
  • The scheme will update automatically when you change colors in Noctalia

Troubleshooting

Section titled “Troubleshooting”

  • Scheme not appearing: Restart KDE Plasma or log out and back in
  • Colors not updating: Ensure KColorScheme toggle is enabled in Noctalia settings