Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
Q

Qt-Advanced-Stylesheets

> 编程语言
Open source

Advanced Stylesheets with Theming Support for Qt

742 stars0 likes1 views
WebsiteGitHub

About

Advanced Stylesheets with Theming Support for Qt


Advanced Stylesheets with Theming Support for Qt.

  • Original Repository: https://github.com/githubuser0xFFFF/Qt-Advanced-Stylesheets
  • What's new
  • Documentation

The library allows runtime color switching for CSS stylesheet themes including SVG resources and SVG icons. The image below shows switching of accent color and switching between dark and light theme. Notice how the icons in the left sidebar change color when switching between dark and light theme.

The main features are:

  • runtime switching of CSS colors
  • runtime color switching of CSS SVG icons / resources
  • runtime color switching of theme aware icons loaded via loadThemeAwareSvgIcon()
  • runtime switching of QPalette colors
  • definition of CSS styles that switch the complete application design
  • definition of XML color themes that allow switching of theme colors (dark / light)
  • switching of individual theme color or switching of accent color
  • QML support

If you run the full_features example, then you can test the functionality. There are some custom dark themes:

And light:

The library allows you to create stylesheets that contain variables that are replaced at runtime like in this example:

css
QComboBox:disabled {
  color: {{primaryColor|opacity(0.2)}};
  background-color: {{secondaryColor|opacity(0.75)}};
  border-bottom: 2px solid {{primaryColor|opacity(0.2)}};
}

QComboBox::drop-down {
  border: none;
  color: {{primaryColor}};
  width: 20px;
}

Navigation

  • Navigation
  • Features
    • Theme-aware Icons
  • Build
  • Getting started
  • Run examples
  • Python Support
  • Future Plans
  • License information
  • Credits
  • Donation
  • Showcase
    • CETONI Elements

Features

Theme-aware Icons

The library supports loading of theme-aware SVG icons.

cpp
AdvancedStylesheet.loadThemeAwareSvgIcon(":/app/images/progress.svg");

This allows runtime color switching of application icons like in the toolbar below.

Build

Open the acss.pro file with QtCreator and start the build, that's it. You can run the example projects and test it yourself.

Getting started

Have look into the file CMainWindow in the full_features example to learn ho to use the CStyleManager. Here are the basic steps to add the style manager to your application:

…

Run examples

The full_features example shows a window with almost all widgets to test all themes and create new ones.

Python Support

There is a Python implementation for this library available qtass-pyside6 - Qt Advanced Stylesheets for PySide6.

The library can be installed via pip:

bash
pip install qtass-pyside6

The source code is available on GitHub:

https://github.com/githubuser0xFFFF/qtass-pyside6

Future Plans

The idea is to merge my QtFluentDesign project into this project to create a nice Windows 11 style that can dynamically adapt to the Windows accent color and to the Window dark and light theme.

License information

This project uses the LGPLv2.1 license for the source code. The stylesheets use individual licenses which are located in the directory of the corresponding style.

Credits

  • Uwe Kindler, Project Maintainer
  • GCPDS - Grupo de control y procesamiento digital de señales

The project is strongly inspired by the great Qt-material project from GCPDS and uses the qt-material stylesheet from this project.

Donation

If this project help you reduce time to develop or if you just like it, you can give me a cup of coffee :coffee::wink:.

Showcase

CETONI Elements

The CETONI Elements software from CETONI is a comprehensive, plugin-based and modular laboratory automation software for controlling CETONI devices using a joint graphical user interface. The software features a powerful script system to automate processes.

CETONI Elements Dark Theme

CETONI Elements Light Theme

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C++

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言