Skip to content

QtShadcn

Modern styling and theming framework for Qt/PySide and PyQt applications, inspired by shadcn/ui.

QtShadcn applies a design-token–based QSS stylesheet to your QApplication in a single function call. Themes are plain XML files β€” no web tooling required.


Features

  • 🎨 Light & dark palettes β€” single XML file, both modes
  • πŸ”„ Auto mode β€” follows the OS preference via darkdetect
  • πŸͺŸ Flexible scope β€” apply styles app-wide to QApplication or scope to a specific QWidget
  • πŸ–₯️ Binding neutral β€” works with PySide6 or PyQt6 via an internal shim
  • Bundled fonts β€” Open Sans and Roboto included out of the box
  • ⚑ Disk cache β€” QSS is re-rendered only when the theme file changes
  • βœ… App-provided Qt runtime β€” install the binding your application already uses
  • 🎯 Themed icons β€” SVG check icons generated and cached at runtime

Quick Example

import sys
from PySide6 import QtWidgets
from qtshadcn import setTheme, setThemeMode

app = QtWidgets.QApplication(sys.argv)

setThemeMode("auto", save=False)
setTheme("my_theme.xml", save=False)

btn = QtWidgets.QPushButton("Hello, QtShadcn!")
btn.show()
sys.exit(app.exec())

Run the gallery to explore every supported widget and state:

make gallery

The gallery has a sidebar, a light/dark toggle, and one page per supported widget.


Installation

pip install qtshadcn
# or
uv add qtshadcn

QtShadcn is distributed through PyPI. A Qt binding is app-provided rather than bundled, so install PySide6 or PyQt6 in your application environment. PySide6 is preferred if both are present.

See Getting Started for the full setup guide.


What's Next

  • See the Theme Format for every supported token and color syntax.
  • See API Reference for setTheme, setThemeMode, ShadcnThemeTokens, and the supported widget list.
  • See Roadmap for planned widget coverage and release milestones.