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
QApplicationor scope to a specificQWidget - π₯οΈ 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())
Widget Gallery¶
Run the gallery to explore every supported widget and state:
The gallery has a sidebar, a light/dark toggle, and one page per supported widget.
Installation¶
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.