Easy qt6 management
Find a file
2026-01-21 12:13:30 -05:00
.github/workflows all: add Qt5 support (#2) 2026-01-16 23:00:40 -05:00
nix all: add support for setting qtquick style 2026-01-20 23:16:16 -05:00
src all: add support for setting qtquick style 2026-01-20 23:16:16 -05:00
.clang-format Initial Commit 2026-01-11 02:13:03 -05:00
.clang-tidy Initial Commit 2026-01-11 02:13:03 -05:00
.gitignore all: add Qt5 support (#2) 2026-01-16 23:00:40 -05:00
CMakeLists.txt build: change min kf6 version to support nix 25.11 2026-01-21 11:18:14 -05:00
flake.lock Initial Commit 2026-01-11 02:13:03 -05:00
flake.nix nix: fix typo 2026-01-21 12:13:30 -05:00
Justfile all: add Qt5 support (#2) 2026-01-16 23:00:40 -05:00
LICENSE feat: license 2026-01-11 02:29:49 -05:00
README.md all: add support for setting qtquick style 2026-01-20 23:16:16 -05:00
shell.nix all: add support for setting qtquick style 2026-01-20 23:16:16 -05:00

qtengine

A Qt6/Qt5 platform theme using the KDE Color Scheme format, meant to be easily configurable.

What problem does this solve?

  • An easy config in JSON
  • Works with Qt5 & Qt6 on the same config
  • Works with KDE apps
  • Doesn't freeze the Plasma XDG Desktop Portal

Nix Flake Installation

First add the input to your flake.

qtengine = {
  url = "github:kossLAN/qtengine";
  inputs.nixpkgs.follows = "nixpkgs";
};

Then use the provided NixOS module.

imports = [inputs.qtengine.nixosModules.default];

# Add your desired theme to your system packages
environment.systemPackages = with pkgs.kdePackages; [
  breeze
  breeze.qt5 # Needed if you want Qt5 support.
  breeze-icons
];

programs.qtengine = {
  enable = true;
  
  config = {
    theme = {
      colorScheme = "${pkgs.kdePackages.breeze}/share/color-schemes/BreezeDark.colors";
      iconTheme = "breeze-dark";
      style = "breeze";

      font = {
        family = "<font name>";
        size = 11;
        weight = -1;
      };

      fontFixed = {
        family = "<font name>";
        size = 11;
        weight = -1;
      };
    };

    misc = {
      singleClickActivate = false;
      menusHaveIcons = true;
      shortcutsForContextMenus = true;
    };
  };
};

Note

A restart of your DE/WM may be required for changes to take effect.

Arch Linux AUR Installation

First install the AUR package.

yay -S qtengine
# yay -S qtengine-git

Warning

These packages are unofficial and community-maintained.

Then copy the example config from /etc/qtengine/config.example.json to ~/.config/qtengine/config.json. Additionally, it can be sourced from a folder in your XDG_CONFIG_DIRS, or by using the QTENGINE_CONFIG environment variable.

Finally set the environment variable QT_QPA_PLATFORMTHEME to qtengine.

Installation on other distributions

First you'll need the following Qt6 dependencies

required: extra-cmake-modules qtbase kconfig kcolorscheme kiconthemes
optional: qtdeclarative

If you want Qt5 support you'll also need

required: qtbase kconfig kconfigwidgets kiconthemes
optional: qtdeclarative qtquickcontrols2

Then build the project

cmake -DCMAKE_BUILD_TYPE:STRING=Release -B build

# OPTIONAL: if you don't want to build with Qt5 support
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DBUILD_QT5=OFF -B build

cmake --build build
cmake --install build

# OPTIONAL: or you can just use the Justfile if you have just
just build
just install

Then write a config at ~/.config/qtengine/config.json, additionally it can be sourced from a folder in your XDG_CONFIG_DIRS, or by using the QTENGINE_CONFIG environment variable.

{
  "theme": {
    "colorScheme": "<path to KColorScheme file>",
    "iconTheme": "breeze-dark",
    "style": "breeze",
    "font": {
      "family": "<font name>",
      "size": 11,
      "weight": -1
    },
    "fontFixed": {
      "family": "<font name>",
      "size": 11,
      "weight": -1
    }
  },
  "misc": {
    "menusHaveIcons": true,
    "singleClickActivate": false,
    "shortcutsForContextMenus": true
  }
}

Finally set the environment variable QT_QPA_PLATFORMTHEME to qtengine.

Note

You will also need a Qt5 AND Qt6 build of your theme for things to work!

Credits

Thank you hyprqt6engine & qt6ct for being the foundation of this project. Also a thanks to outfoxxed because I "borrowed" a lot of his C++ build tools that made working in C++ a lot less painful, especially on NixOS.