Skip to main content

Fork Purpose

This repository performs the following:

  • Includes fixes to run on newer Python versions
  • Publishes to PyPi as pyqtdarktheme-fork

PyQtDarkTheme

PyQtDarkTheme applies a flat dark theme to QtWidgets application. There's a light theme too. Color balanced from the dark theme for easy viewing in daylight.

Check out the complete documentation.

Project status PyPI Latest Release Python Versions Qt Versions License

Tests pre-commit.ci status codecov Documentation Status

Features

  • A flat dark and light theme
  • Support PySide and PyQt
  • Sync with OS's theme and accent (Mac, Windows, Linux)
  • Resolve the style differences between Qt versions
  • Provide dark/light theme QPalette
  • Override Qt old standard icons

Themes

Dark Theme

widget_gallery_dark_theme

Light Theme

widget_gallery_light_them

Requirements

  • Python 3.8+
  • Qt 5.15+
  • PySide6, PyQt6, PyQt5 or PySide2

Installation Method

  • Last released version

    pip install pyqtdarktheme-fork
    
  • Latest development version

    pip install git+https://github.com/5yutan5/PyQtDarkTheme.git@main
    

Usage

import sys

from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton

import qdarktheme

app = QApplication(sys.argv)
# Apply the complete dark theme to your Qt App.
qdarktheme.setup_theme()

main_win = QMainWindow()
push_button = QPushButton("PyQtDarkTheme!!")
main_win.setCentralWidget(push_button)

main_win.show()

app.exec()

Further information can be found in our docs:

Enable HiDPI

# enable_hi_dpi() must be called before the instantiation of QApplication.
qdarktheme.enable_hi_dpi()
app = QApplication(sys.argv)
qdarktheme.setup_theme()

For Qt6 bindings, HiDPI “just works” without using this function.

Light theme

qdarktheme.setup_theme("light")

Sync with OS's theme and accent

qdarktheme.setup_theme("auto")

sync with os theme

On macOS, qdarktheme also syncs with accent colors. sync with os accent

Customizing colors

You can customize the theme color.

# Customize accent color.
qdarktheme.setup_theme(custom_colors={"primary": "#D0BCFF"})

For a list of all customizable colors, see the Theme Color Reference:

Sharp frame

You can change the corner style.

# Default is "rounded".
stylesheet = qdarktheme.setup_theme(corner_shape="sharp")

QPalette and stylesheet

You can also only load QPalette and stylesheet. qdarktheme.setup_theme uses the following functions internally.

palette = qdarktheme.load_palette(theme="dark")
stylesheet = qdarktheme.load_stylesheet(theme="dark")

Example

To check all Qt widgets, run:

python -m qdarktheme.widget_gallery

License

The svg files for the PyQtDarkTheme are derived Material design icons(Apache License Version 2.0). Qt stylesheets are originally fork of QDarkStyleSheet(MIT License). Other files are covered by PyQtDarkTheme's MIT license. The accent detector(qdarktheme/_os_appearance/_accent/_mac_detect) is inspired by darkdetect(3-clause BSD License).

Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. You can get started by reading this:

Change log

See Releases.

Release files for PyQtDarkTheme-fork 2.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyQtDarkTheme-fork 2.3.6
File Size Uploaded
pyqtdarktheme_fork-2.3.6.tar.gz 40.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyQtDarkTheme-fork 2.3.6
File Interpreter ABI Platform
pyqtdarktheme_fork-2.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 95.0 kB

Release files / pyqtdarktheme_fork-2.3.6.tar.gz

Download URL pyqtdarktheme_fork-2.3.6.tar.gz
Size 40.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9ab287a033a4742767bcb6698fb60247beef7967d74eb949f7ab36ee866ff1d7
BLAKE2b-256 checksum
How to use checksums
e89d2ce9dca0e37e4ef2385102effec80457e981b0a64923376d122a52190bef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 4, 2026.

Transparency log

Release files / pyqtdarktheme_fork-2.3.6-py3-none-any.whl

Download URL pyqtdarktheme_fork-2.3.6-py3-none-any.whl
Size 54.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
876dc8cc0e01468a3f7fe5a860dfd422ccab48b33beef18dfdecb6312c20c556
BLAKE2b-256 checksum
How to use checksums
8f8efecdf206415c432fcc301a19701ea437af5dbdcd33020ac4f5288d060a65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.3.6 This release

2 release files

2.3.4

2 release files

2.3.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page