/QDarkStyleSheet

A dark style sheet for QtWidgets application

Primary LanguagePythonOtherNOASSERTION

QDarkStyleSheet

Build Status Docs Status Latest PyPI version License: MIT License: CC BY 4.0 Conduct

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++.

Check out the complete documentation.

What is new?

Version 3

In the current version 3, qdarkstyle is now working as a theme framework, currently for dark/light themes, keeping styled widgets identical throughout theme colors.

The palette has been redefined and improved (UI/UX) to accept more colors and to be able to implement new themes thanks to the Spyder team collaboration.

The current stable version is using Python 3 (preferable 3.6+) and Qt5 (PyQt5 and PySide 2).

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

[*] 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.

Version 2

We moved to QtPy to simplify your code in v2.8, thus this is a required dependency now. We included special patches in three main categories: operating system, Qt/binding version, application.

Included in that, lots of widgets' styles were included/fixed. A Qt application example (Python only) with almost all types of widgets and combinations were included to serve as a portfolio and a checklist for new styles.

We have added SCSS in v2.7, so the palette can be accessed programmatically. Also, many scripts were added to give freedom to developers who want to change the colors of our palette. All images and icons were revised, also creating SVG files for all of them.

In version 2.6 and later, a restructure stylesheet is provided. The palette has only 9 colors. Most widgets are revised and their styles were improved. We also provide a command line (script) to get info that could be used when opening issues. See the image below.

Version 1

First stable release of QDarkStyle.

Installation

Python

From PyPI: Get the latest stable version of qdarkstyle package using pip (preferable):

From code: Download/clone the project, go to qdarkstyle folder then:

C++

Note: The ":" in the file name is necessary to define that file as a resource library. For more information see the discussion here.

Usage in applications

If your project already uses QtPy or you need to set it programmatically, it is far more simple

If you are using PyQt5 directly, see the complete example

Here is an example using PySide2

If you use PyQtGraph, then the code is

If you are using Qt.py, which is different from qtpy, you should install qtpy then set both to the same binding.

Usage of example/portfolio

There is an example included in the package. You only need to have PySide2 or PyQt5 installed on your system.

Changelog

Please, see CHANGES file.

License

This project is licensed under the MIT license. Images contained in this project is licensed under CC-BY license.

For more information see LICENSE file.

Authors

For more information see AUTHORS file.

Contributing

Most widgets have been styled. If you find a widget that has not been style, just open an issue on the issue tracker or, better, submit a pull request.

If you want to contribute, see CONTRIBUTING file.