All Projects → ColinDuquesnoy → Qdarkstylesheet

ColinDuquesnoy / Qdarkstylesheet

Licence: other
A dark style sheet for QtWidgets application

Programming Languages

python
139335 projects - #7 most used programming language
SCSS
7915 projects
shell
77523 projects

Projects that are alternatives of or similar to Qdarkstylesheet

Stackoverflow
my answers in Stack Overflow
Stars: ✭ 211 (-89.19%)
Mutual labels:  qt, pyqt5, pyside, pyqt4
QtPyConvert
An automatic Python Qt binding transpiler to the Qt.py abstraction layer.
Stars: ✭ 66 (-96.62%)
Mutual labels:  pyqt5, qt5, pyqt4, pyside
Qt Frameless Window Darkstyle
simple MainWindow class implementation with frameless window and custom dark style. It adds also support for titlebar and buttons (minimize, maximize, close)
Stars: ✭ 628 (-67.83%)
Mutual labels:  dark-theme, qt, qt5, stylesheets
Scihubeva
A Cross Platform Sci-Hub GUI Application
Stars: ✭ 683 (-65.01%)
Mutual labels:  qt, qt5, pyqt5, pyside
Qt Python Binding Examples
Lots of simple and Pythonic PySide demos
Stars: ✭ 312 (-84.02%)
Mutual labels:  qt, pyqt5, pyside, pyqt4
Git Cola
git-cola: The highly caffeinated Git GUI
Stars: ✭ 1,787 (-8.45%)
Mutual labels:  qt5, pyqt5, pyqt4
PyQtDarkTheme
A flat dark theme for PySide and PyQt.
Stars: ✭ 50 (-97.44%)
Mutual labels:  dark-theme, pyqt5, pyside
Pyqt
PyQt Examples(PyQt各种测试和例子) PyQt4 PyQt5
Stars: ✭ 3,783 (+93.8%)
Mutual labels:  pyqt5, pyside, pyqt4
idasix
IDAPython compatibility library. idasix aims to create a smooth ida development process and allow a single codebase to function with multiple IDA/IDAPython versions
Stars: ✭ 24 (-98.77%)
Mutual labels:  qt5, pyqt4, pyside
QtExamples
Translations of the official Qt examples into PyQt5 (also PySide2) and more.
Stars: ✭ 39 (-98%)
Mutual labels:  qt, pyqt5, qt5
Examples
Learn to create a desktop app with Python and Qt
Stars: ✭ 1,196 (-38.73%)
Mutual labels:  qt, qt5, pyqt5
Qt.py
Minimal Python 2 & 3 shim around all Qt bindings - PySide, PySide2, PyQt4 and PyQt5.
Stars: ✭ 684 (-64.96%)
Mutual labels:  pyqt5, pyside, pyqt4
Pyvfx Boilerplate
A boilerplate for creating PySide/PyQt or PySide2/PyQt5 applications running inside of Maya, Nuke and standalone - using Python 2 or 3.
Stars: ✭ 131 (-93.29%)
Mutual labels:  pyqt5, pyside, pyqt4
Apk Icon Editor
APK editor to easily change APK icons, name and version.
Stars: ✭ 104 (-94.67%)
Mutual labels:  qt, qt5
Telegram Qt
Qt-based library for Telegram network
Stars: ✭ 105 (-94.62%)
Mutual labels:  qt, qt5
Handwriter
A smart program to convert digital document to hand-written document
Stars: ✭ 108 (-94.47%)
Mutual labels:  qt5, pyqt5
Awesome Kde
A curated list of awesome apps, extensions, modules, themes and tools for the KDE Desktop Environment.
Stars: ✭ 101 (-94.83%)
Mutual labels:  qt, qt5
Hydra
A simple customizable cross-platform IDE
Stars: ✭ 109 (-94.42%)
Mutual labels:  qt5, pyqt5
Feedback
Feedback & wiki for Snipaste https://snipaste.com
Stars: ✭ 1,863 (-4.56%)
Mutual labels:  qt, qt5
Autoannotationtool
A label tool aim to reduce semantic segmentation label time, rectangle and polygon annotation is supported
Stars: ✭ 113 (-94.21%)
Mutual labels:  qt, qt5

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):

pip install qdarkstyle

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

  • You can use the setup script and pip install.

    pip install .
  • Or, you can use the setup script with Python:

    python setup.py install

C++

  • Download/clone the project and copy the following files to your application directory (keep the existing directory hierarchy). Substitute the theme by the currently available (dark/light) the theme you need to use.

    • qdarkstyle/theme/style.qss
    • qdarkstyle/theme/style.qrc
    • qdarkstyle/theme/rc/ (the whole directory)
  • Add qdarkstyle/theme/style.qrc to your .pro file as follows:

    RESOURCES += qdarkstyle/theme/style.qrc
  • Load the stylesheet:

    QFile f(":qdarkstyle/theme/style.qss");
    
    if (!f.exists())   {
        printf("Unable to set stylesheet, file not found\n");
    }
    else   {
        f.open(QFile::ReadOnly | QFile::Text);
        QTextStream ts(&f);
        qApp->setStyleSheet(ts.readAll());
    }

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

import sys
import qdarkstyle
import os

# set the environment variable to use a specific wrapper
# it can be set to pyqt, pyqt5, pyside or pyside2 (not implemented yet)
# you do not need to use QtPy to set this variable
os.environ['QT_API'] = 'pyqt5'

# import from QtPy instead of doing it directly
# note that QtPy always uses PyQt5 API
from qtpy import QtWidgets

# create the application and the main window
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow()

# setup stylesheet
# the default system in qdarkstyle uses qtpy environment variable
app.setStyleSheet(qdarkstyle.load_stylesheet())

# run
window.show()
app.exec_()

If you are using PyQt5 directly, see the complete example

import sys
import qdarkstyle
from PyQt5 import QtWidgets

# create the application and the main window
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow()

# setup stylesheet
app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
# or in new API
app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api='pyqt5'))

# run
window.show()
app.exec_()

Here is an example using PySide2

import sys
import qdarkstyle
from PySide2 import QtWidgets

# create the application and the main window
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QMainWindow()

# setup stylesheet
app.setStyleSheet(qdarkstyle.load_stylesheet_pyside2())
# or in new API
app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api='pyside2'))

# run
window.show()
app.exec_()

If you use PyQtGraph, then the code is

import sys
import qdarkstyle
import os

# set the environment variable to use a specific wrapper
# it can be set to PyQt, PyQt5, PySide or PySide2 (not implemented yet)
os.environ['PYQTGRAPH_QT_LIB'] = 'PyQt5'

# import from pyqtgraph instead of doing it directly
# note that PyQtGraph always uses PyQt4 API
from pyqtgraph.Qt import QtGui

# create the application and the main window
app = QtGui.QApplication(sys.argv)
window = QtGui.QMainWindow()

# setup stylesheet
app.setStyleSheet(qdarkstyle.load_stylesheet(qt_api=os.environ['PYQTGRAPH_QT_LIB'])

# run
window.show()
app.exec_()

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.

# dark theme example
$ qdarkstyle.example --palette=dark

# light theme example
$ qdarkstyle.example --palette=light

# no theme/style sheet applied
$ qdarkstyle.example --palette=none

# check all options included
$ qdarkstyle.example --help

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.

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