Skip to main content
Version: main

qt5

Generates a qt5ct custom colour scheme for Qt 5 applications on non-Plasma desktops. qt5ct is Qt 5's "configuration tool" — it provides a QPlatformTheme plugin that injects a user-defined QPalette into every Qt 5 app at startup. The file written here is one of the colour schemes qt5ct can be pointed at; selecting it in qt5ct.conf (or via the qt5ct GUI) makes Qt 5 apps adopt tinct's palette.

For KDE Plasma users, prefer the kde-plasma plugin — Plasma's colour scheme system is richer and applies system-wide.

Installation

Built into tinct — nothing to install separately. tinct generate -o qt5 works out of the box.

You also need qt5ct installed and QT_QPA_PLATFORMTHEME=qt5ct set in your environment (typically in ~/.config/environment.d/*.conf or ~/.profile). The plugin's PreExecute aborts if ~/.config/qt5ct/ doesn't exist; create the directory and run qt5ct at least once to initialise.

# Arch / CachyOS
sudo pacman -S qt5ct

# Debian / Ubuntu
sudo apt install qt5ct

Quick start

tinct generate -i image -p ~/Pictures/wallpaper.jpg -o qt5

Generated files

FilePathRole
tinct.conf~/.config/qt5ct/colors/tinct.confCustom qt5ct colour scheme; 22-slot [ColorScheme] ini for active / inactive / disabled QPalette states

Integration

qt5ct discovers user colour schemes from ~/.config/qt5ct/colors/*.conf and lists them under qt5ct → Appearance → Color scheme → Custom. The plugin writes into that directory, so the scheme called "tinct" appears in the dropdown automatically.

To select it:

  1. Ensure QT_QPA_PLATFORMTHEME=qt5ct is exported (check with env | grep QT_QPA).
  2. Run qt5ct and pick Color scheme → Custom → tinct.

Or, edit ~/.config/qt5ct/qt5ct.conf directly:

[Appearance]
custom_palette=true
color_scheme_path=/home/<user>/.config/qt5ct/colors/tinct.conf

The plugin's PostExecute checks ~/.config/qt5ct/qt5ct.conf for a color_scheme_path= line containing tinct.conf; if absent, it prints an actionable banner.

Reload behaviour

Automatic

After writing the file, the plugin calls the shared KDE D-Bus theme-reload helper (kdedbus.ReloadTheme). On KDE Plasma this triggers a global Qt repalette; on non-KDE desktops the D-Bus call is a no-op (the relevant services don't exist) and the plugin logs a verbose-mode note.

qt5ct itself has no IPC reload. Once qt5ct.conf references the scheme, every newly-launched Qt 5 app picks it up — but already-running Qt 5 apps continue to use the palette they read at startup.

Manual fallback

Close and reopen the Qt 5 applications you want to retheme. There is no qt5ct-equivalent of dunstctl reload.

Uninstall / revert

  1. Stop pointing qt5ct at the tinct scheme — edit ~/.config/qt5ct/qt5ct.conf:

    [Appearance]
    custom_palette=false
    # color_scheme_path=... # comment out or delete

    Or in the qt5ct GUI: Appearance → Color scheme → <pick a built-in>.

  2. Delete the generated file:

    rm ~/.config/qt5ct/colors/tinct.conf
  3. Reload — close and reopen Qt 5 apps (or restart your session for the global change to take effect).

  4. External state: this plugin only writes to ~/.config/qt5ct/colors/. It does not modify qt5ct.conf itself — selecting the scheme there was your manual step in Integration and you have to undo it in step 1.

Flags

FlagDefaultDescription
--qt5.output-dir~/.config/qt5ct/colorsOverride the output directory

Colour role mapping

qt5ct stores each QPalette state (active / inactive / disabled) as a 22-comma-separated #AARRGGBB list. The slot order is fixed by Qt:

SlotQt roleTinct role (active)Tinct role (inactive / disabled)
0WindowTextforegroundforeground @ 70% / 50% alpha
1Buttonsurfacesurface
2LightsurfaceVariantsurfaceVariant
3Midlightborder (from outline/border/foregroundMuted)same
4Darkbackgroundbackground
5Midbackgroundbackground
6Textforegroundforeground @ 70% / 50% alpha
7BrightTextforegroundforeground
8ButtonTextforegroundforeground @ 70% / 50% alpha
9Basebackgroundbackground
10Windowsurfacesurface
11AlternateBaseborderborder
12ToolTipBaseaccent1accent1 (disabled = surface)
13ToolTipTextbackgroundforeground @ 70% / 50% alpha
14Text (re-use)accent1accent1 @ 70% / 50% alpha
15Highlight (interim)foregroundforeground @ 70%
16Button (re-use)surfacesurface
17BrightText (re-use)#ffffffff literal#ffffffff literal
18Link (interim)backgroundbackground
19LinkVisited (interim)foregroundforeground
20Highlight (translucent)accent1 @ 50% alphaaccent1 @ 70% / 30% alpha
21HighlightedTextaccent1accent1 (disabled = surface)

(Some Qt slot indices appear twice in qt5ct's 22-slot format; that's how qt5ct serialises the palette.)

Customising the template

tinct plugins templates dump -o qt5 -l ~/.config/tinct/templates/qt5

This creates ~/.config/tinct/templates/qt5/tinct.conf.tmpl. Tinct uses your version in preference to the embedded default.

See the templating reference for the available functions and palette accessors.

Troubleshooting

Plugin skipped: qt5ct config directory does not exist

PreExecute couldn't find ~/.config/qt5ct/. Install qt5ct and run it once (or mkdir -p ~/.config/qt5ct/colors) to create the config directory, then retry.

Plugin printed Qt5 Theme Configuration Required banner

PostExecute checked ~/.config/qt5ct/qt5ct.conf and didn't find a color_scheme_path= line referencing tinct.conf. Follow the steps in Integration: set QT_QPA_PLATFORMTHEME=qt5ct in your environment and select the tinct scheme in the qt5ct GUI (or set custom_palette=true and color_scheme_path=... in qt5ct.conf directly).

Qt 5 apps still look like Adwaita / Breeze

Either QT_QPA_PLATFORMTHEME isn't set (qt5ct only kicks in when Qt is told to use it), or your Qt apps are running under Flatpak with their own bundled Qt stack. Check env QT_DEBUG_PLUGINS=1 <app> to see what platform-theme plugin Qt actually loaded.

Already-open apps didn't update

qt5ct reads the palette at app start. Close and reopen the apps; there is no Qt-side IPC to repalette running apps from a config file change (the D-Bus reload only works on KDE Plasma).

I'm on KDE Plasma — does this plugin do anything useful?

Probably not. Plasma supplies its own QPlatformTheme (plasma) that overrides QT_QPA_PLATFORMTHEME=qt5ct. Use the kde-plasma plugin instead, which writes a proper KDE colour scheme.

  • qt6 — sibling plugin for Qt 6 apps (writes to ~/.config/qt6ct/colors/).
  • kde-plasma — preferred for KDE Plasma users; applies to both Qt 5 and Qt 6 apps system-wide.
  • gtk3, gtk4 — pair with these so Qt and GTK apps look consistent.