Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
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.
Last released version
pip install pyqtdarktheme
Latest development version
pip install git+https://github.com/5yutan5/PyQtDarkTheme.git@main
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_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.
qdarktheme.setup_theme("light")
qdarktheme.setup_theme("auto")
On macOS, qdarktheme also syncs with accent 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:
You can change the corner style.
# Default is "rounded".
stylesheet = qdarktheme.setup_theme(corner_shape="sharp")
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")
To check all Qt widgets, run:
python -m qdarktheme.widget_gallery
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).
All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome. You can get started by reading this:
See Releases.
FAQs
Flat dark theme for PySide and PyQt.
We found that pyqtdarktheme demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.