Skip to main content

PyQtDarkTheme

PyQtDarkTheme applies a flat dark theme to QtWidgets application(PySide and PyQt). There's a light theme too. Color and style balanced from a dark theme for easy viewing in daylight.

Check out the complete documentation.

Project status
PyPI Latest Release Python Versions Qt Versions License Code style: black

Tests
tests pre-commit.ci status codecov Total alerts Documentation Status

Features

  • A flat dark and light theme
  • Support PySide and PyQt
  • Support PyInstaller
  • Resolve the style differences between Qt versions
  • QPalette of dark and light theme

Themes

Dark Theme

widget_gallery_dark_theme

Light Theme

widget_gallery_light_them

Requirements

  • Python 3.7+
  • Qt 5.11+
  • PySide6, PyQt6, PyQt5 or PySide2

Installation Method

  • Last released version

    pip install pyqtdarktheme
    
  • 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)
main_win = QMainWindow()
push_button = QPushButton("PyQtDarkTheme!!")
main_win.setCentralWidget(push_button)

# Apply dark theme to Qt application
app.setStyleSheet(qdarktheme.load_stylesheet())

main_win.show()

app.exec()

⚠ The image quality may be lower on Qt5(PyQt5, PySide2) due to the use of svg. You can add the following attribute to improve the quality of images.

app.setAttribute(Qt.ApplicationAttribute.AA_UseHighDpiPixmaps)

Light theme

app.setStyleSheet(qdarktheme.load_stylesheet("light"))

Dark and Light palette

You can get color of dark and light theme by loading QPalette. To load palette, run:

palette = qdarktheme.load_palette()
# or
palette = qdarktheme.load_palette("light")

For example, you can apply a link color to your application.

import sys

from PyQt5.QtGui import QPalette
from PyQt5.QtWidgets import QApplication

import qdarktheme

app = QApplication(sys.argv)
dark_palette = qdarktheme.load_palette()
palette = app.palette()
palette.setColor(QPalette.ColorRole.Link, dark_palette.link().color())
app.setPalette(palette)

Further information can be found in our docs:

Sharp frame

You can change the border corner style.

# Default is "rounded".
stylesheet = qdarktheme.load_stylesheet(border="sharp")

widget_gallery_dark_theme_sharp

Example

To check example app, 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.

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.

Metadata

Release files for omnipose-theme 1.1.3

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

Source distribution (sdist)

Source distribution for omnipose-theme 1.1.3
File Size Uploaded Provenance Actions
omnipose_theme-1.1.3.tar.gz 35.5 kB Without provenance Details for omnipose_theme-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for omnipose-theme 1.1.3
File Interpreter ABI Platform Actions
omnipose_theme-1.1.3-py3-none-any.whl Python 3 none any Details for omnipose_theme-1.1.3-py3-none-any.whl

Total release size: 78.9 kB

Release files / omnipose_theme-1.1.3.tar.gz

Download URL omnipose_theme-1.1.3.tar.gz
Size 35.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eabdca1b9c87f5dfbbd385d26d948f3ffe737bac168e7b85944a3bb81a9bb294
BLAKE2b-256 checksum
How to use checksums
49aa26b8718e4ad004a389141c15498e847a30f98090e3cd2da4022a05e0a70f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release files / omnipose_theme-1.1.3-py3-none-any.whl

Download URL omnipose_theme-1.1.3-py3-none-any.whl
Size 43.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02ba540bffbac92831330a187585bf67d5ed332839ff2ee6efeff54c6f1c3d75
BLAKE2b-256 checksum
How to use checksums
427da0e98b8d23b833d13635cdf78b4dd22077dca872bd57ba8476d9e55cd8dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Security for omnipose-theme 1.1.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 release files No provenance

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