Skip to main content

The most complete dark/light style sheet for C++/Python and Qt applications

Project description

The most complete dark/light style sheet for Qt applications (Qt4, Qt5, PySide, PySide2, PyQt4, PyQt5, QtPy, PyQtGraph, Qt.Py) for Python 2/3 and C++.

Python 2, as well as Qt4 (PyQt4 and PySide), will not be supported anymore. They still there as it is, but no back-compatibility, fixes, nor features will be implemented.

We still preparing the portability to Qt6 since we need changes in QtPy dependency project.

Check the documentation to see how to set the desirable theme palette.

This module provides a function to load the stylesheets transparently with the right resources file.

First, start importing our module

import qdarkstyle

Then you can get stylesheet provided by QDarkStyle for various Qt wrappers as shown below

# PySide
dark_stylesheet = qdarkstyle.load_stylesheet_pyside()
# PySide 2
dark_stylesheet = qdarkstyle.load_stylesheet_pyside2()
# PyQt4
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt()
# PyQt5
dark_stylesheet = qdarkstyle.load_stylesheet_pyqt5()

Alternatively, from environment variables provided by QtPy, PyQtGraph, Qt.Py

# QtPy
dark_stylesheet = qdarkstyle.load_stylesheet()
# PyQtGraph
dark_stylesheet = qdarkstyle.load_stylesheet(qt_api=os.environ('PYQTGRAPH_QT_LIB'))
# Qt.Py
dark_stylesheet = qdarkstyle.load_stylesheet(qt_api=Qt.__binding__)

Finally, set your QApplication with it

app.setStyleSheet(dark_stylesheet)

Enjoy!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for QDarkStyle, version 3.0.2
Filename, size File type Python version Upload date Hashes
Filename, size QDarkStyle-3.0.2-py2.py3-none-any.whl (453.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size QDarkStyle-3.0.2.tar.gz (433.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page