This a mirror of WSJT-X and will be updated every 6 hours. PR will be ignored, head to the SF link. Repo will be updated at 06:00:00 UTC 12:00:00 UTC 18:00:00 UTC 00:00:00 UTC Now fixed.
Go to file
2018-12-13 18:00:54 -02:00
.github Add warnings to changes that will be made in version 3.0 2018-04-20 16:36:51 -03:00
example Add issue #123 on example and update files 2018-12-13 18:00:54 -02:00
qdarkstyle Fix bordeless widgets inside QTab, fix #123 2018-12-13 17:59:20 -02:00
screenshots Update screenshots 2018-11-01 16:33:18 -03:00
script Improve script for process ui 2018-11-08 15:02:51 -02:00
svg Move svg source out of the package 2015-06-25 19:53:56 +02:00
test Tool button is now transparent, needs more work yet 2018-11-12 14:59:57 -02:00
.gitignore New files for tox, first try, working locally 2018-11-08 15:02:23 -02:00
.travis.yml New files for tox, first try, working locally 2018-11-08 15:02:23 -02:00
AUTHORS.md Improve QPushButton menu arrow margin, fix #102 (#108) 2018-09-25 09:28:29 -03:00
CHANGES.md Update changes 2018-11-14 11:56:21 -02:00
CODE_OF_CONDUCT.md Add CODE_OF_CONDUCT, update README, CHANGES and CONTRIBUTING 2018-02-22 10:58:57 -03:00
CONTRIBUTING.md Add CODE_OF_CONDUCT, update README, CHANGES and CONTRIBUTING 2018-02-22 10:58:57 -03:00
LICENSE.md Linting MD files and review 2018-02-20 11:26:06 -03:00
makeppa.sh FIX: naming and encoding 2018-10-24 15:52:28 -03:00
MANIFEST.in Fix python 2.7 compatibility, closes #121 2018-11-14 11:54:34 -02:00
palette.png Add palette for comparison 2018-12-13 18:00:07 -02:00
palette.svg Add palette for comparison 2018-12-13 18:00:07 -02:00
PKGBUILD Update PKGBUILD 2015-04-06 12:13:13 +02:00
PRODUCTION.md Add production file 2018-02-20 11:27:17 -03:00
README.md Update files and resources 2018-11-01 16:22:56 -03:00
setup.cfg Updating file names 2018-02-07 17:38:55 -02:00
setup.py Add script in setup and improve script info 2018-10-25 16:43:17 -03:00
stdeb.cfg FIX: naming and encoding 2018-10-24 15:52:28 -03:00
tox.ini New files for tox, first try, working locally 2018-11-08 15:02:23 -02:00

QDarkStylesheet

Build Status Latest PyPI version License: MIT License: CC BY 4.0 conduct

A dark stylesheet for Qt applications (Qt4, Qt5, PySide, PySide2, PyQt4, PyQt5, QtPy, PyQtGraph).

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

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

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

    QFile f(":qdarkstyle/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

Here is an example using PySide

import sys
import qdarkstyle
from PySide import QtGui

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

# setup stylesheet
app.setStyleSheet(qdarkstyle.load_stylesheet_pyside())

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

To use another wrapper for Qt, you need to replace some lines. See examples below.

To use PyQt4, change two lines

from PySide import QtGui
app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt())

If PyQt5, more lines need to be changed because of its API, 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())

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

If your project 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'] = 'pyqt'

# 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
app.setStyleSheet(qdarkstyle.load_stylesheet_from_environment())

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

It is also simple if you use PyQtGraph

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'] = 'PyQt'

# 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_from_environment(is_pyqtgraph=True))

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

There is an example included in the example folder. You can run the script without installing qdarkstyle. You only need to have PySide or PySide2 or PyQt4 or PyQt5 installed on your system.

What is new?

In the version 2.6 and later, a reestructure 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.

qdarkstyle --all

Snapshots

Here are a few snapshots comparing the use of QDarkStyle v2.6.1 and the default style. Click in the image to zoom.

Containers (no tabs) and Buttons
Containers (tabs) and Displays
Widgets and Inputs (fields)
Views and Inputs (no fields)

Changelog

Please, see CHANGES file.

License

This project is licensed under the MIT license. Images contained in this project are 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.