Registry / devops / qt-material

qt-material

JSON →
library2.17pypypi✓ verified 86d ago

Material-inspired stylesheets for PySide6 and PyQt6 applications. Provides a modern Material Design theme with light/dark variants, customizable colors, and automatic layout support. Current version 2.17, released irregularly. Requires Python ≥3.7.

pip install qt-material
INSTALL
IMPORT
SIG · QT-MATERIAL
Q
qt-material
devopspythonv2.17
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

QtStyleTools
from qt_material import QtStyleTools
from qt_material import QtStyleTool
Class name is plural: QtStyleTools
apply_stylesheet
from qt_material import apply_stylesheet
from qt_material.styles import apply_stylesheet
apply_stylesheet is directly in qt_material
list_themes
from qt_material import list_themes
from qt_material.themes import list_themes
list_themes is a top-level function

Create a QApplication, apply a Material theme, and launch a window.

import sys from PySide6 import QtWidgets from qt_material import apply_stylesheet app = QtWidgets.QApplication(sys.argv) apply_stylesheet(app, theme='dark_teal.xml') window = QtWidgets.QMainWindow() window.show() sys.exit(app.exec())
Debug
Known issues
breakingqt-material 2.x is not compatible with PyQt5 or PySide2. Only PySide6 and PyQt6 are supported.
fix
Upgrade to PySide6 or PyQt6, or use qt-material 1.x (if you must stay on older Qt bindings).
affects: >=2.0.0
deprecatedThe function `apply_stylesheet` parameter `theme` expects theme file name (e.g., 'dark_teal.xml') not a path. Using a full path may cause issues in some cases.
fix
Use only the theme name (e.g., 'dark_teal.xml') and ensure theme files are bundled with the package.
affects: all
gotchaApplying a stylesheet after showing the window may cause visual glitches. Always apply before showing any widgets.
fix
Call apply_stylesheet immediately after creating QApplication, before any window.show().
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'qt_material'
The library is not installed.
fix
Run `pip install qt-material`.
AttributeError: module 'qt_material' has no attribute 'apply_stylesheet'
The import path is wrong or an old version is installed.
fix
Use `from qt_material import apply_stylesheet` and ensure qt-material >=2.0.0.
qt_material.exceptions.ThemeNotFoundError: Theme 'dark_teal' not found.
Theme name missing the .xml extension.
fix
Use full filename with .xml, e.g., 'dark_teal.xml'.
Upgrade
Version history
2.17latest on PyPI · released Apr 21, 2025
Audit
Dependencies
PySide6optionalRuntime dependency (or PyQt6 alternative)
PyQt6optionalRuntime dependency (or PySide6 alternative)
Agent activity
4 hits · last 30 days
node
4
Resources
qt-material — pip install qt-material · libregistry