All Projects → 5yutan5 → PyQtDarkTheme

5yutan5 / PyQtDarkTheme

Licence: MIT license
A flat dark theme for PySide and PyQt.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to PyQtDarkTheme

QtPyConvert
An automatic Python Qt binding transpiler to the Qt.py abstraction layer.
Stars: ✭ 66 (+32%)
Mutual labels:  pyqt5, pyside, pyside2, pyqt
Fbs
Create Python GUIs with Qt in minutes
Stars: ✭ 3,189 (+6278%)
Mutual labels:  pyqt5, pyside2, pyqt6, pyside6
Scihubeva
A Cross Platform Sci-Hub GUI Application
Stars: ✭ 683 (+1266%)
Mutual labels:  pyqt5, pyside, pyqt
QtExamples
Translations of the official Qt examples into PyQt5 (also PySide2) and more.
Stars: ✭ 39 (-22%)
Mutual labels:  pyqt5, pyside2, pyqt
Picacg Windows
哔咔漫画window客户端,界面使用PySide2,已实现分类、搜索、收藏夹、下载、在线观看、waifu2x等功能。
Stars: ✭ 35 (-30%)
Mutual labels:  pyqt5, pyside, pyqt
Stackoverflow
my answers in Stack Overflow
Stars: ✭ 211 (+322%)
Mutual labels:  pyqt5, pyside, pyqt
Qdarkstylesheet
A dark style sheet for QtWidgets application
Stars: ✭ 1,952 (+3804%)
Mutual labels:  dark-theme, pyqt5, pyside
VaspStudio
An useful tool to submit your VASP job on HPC, manage your jobs and extract eneries...自动化VASP任务提交、计算结果提取,任务文件管理的工具
Stars: ✭ 63 (+26%)
Mutual labels:  pyqt5, pyqt
GithubDarkTheme
Dark Theme for Github
Stars: ✭ 60 (+20%)
Mutual labels:  dark-theme, darktheme
koapy
KOAPY 는 키움 OpenAPI 를 Python 에서 쉽게 사용할 수 있도록 만든 라이브러리 패키지 및 툴입니다.
Stars: ✭ 103 (+106%)
Mutual labels:  pyqt5, pyside2
markdown.css
📝 The simple CSS to replicate the GitHub Markdown style (Sukka Ver.)
Stars: ✭ 13 (-74%)
Mutual labels:  style, stylesheet
picacg-qt
哔咔漫画, PicACG comic PC client(Windows, Linux, MacOS)
Stars: ✭ 1,325 (+2550%)
Mutual labels:  pyqt6, pyside6
pdfdir
PDF导航(大纲/目录)添加工具
Stars: ✭ 195 (+290%)
Mutual labels:  pyqt5, pyqt
postcss-gtk
Processes GTK+ CSS into browser CSS
Stars: ✭ 23 (-54%)
Mutual labels:  style, stylesheet
CustomWebCheckbox
An example of a make checkbox design on the web.
Stars: ✭ 12 (-76%)
Mutual labels:  style, stylesheet
python-qt-live-coding
Live coding environment for Python, Qt and QML.
Stars: ✭ 35 (-30%)
Mutual labels:  pyside2, pyqt
pyGISS
📡 A lightweight GIS Software in less than 100 lines of code
Stars: ✭ 114 (+128%)
Mutual labels:  pyqt5, pyqt
Grabber
A wrapper for Youtube-dl for Windows.
Stars: ✭ 22 (-56%)
Mutual labels:  pyqt5, pyqt
qt-tile-layout
A tile layout for PyQt5
Stars: ✭ 18 (-64%)
Mutual labels:  pyqt5, pyqt
modern-login
A simple login form built with PyQt 5
Stars: ✭ 35 (-30%)
Mutual labels:  pyqt5, pyqt

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].