Giter Club home page Giter Club logo

qdarkstylesheet's Introduction

QDarkStylesheet

Bitdeli Badge Build Status Number of PyPI downloads Latest PyPI version

A dark stylesheet for Qt applications.

License

This project is licensed under the MIT license.

Installation

Python

Install the qdarkstyle package using the setup script or using pip:

python setup.py install

or

pip install qdarkstyle

C++

  1. 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)
  1. Add qdarkstyle/style.qrc to your .pro file

  2. 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);
    QApplication::instance()->setStyleSheet(ts.readAll());
}

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

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

To use PyQt4 instead of PySide, you just need to replace

app.setStyleSheet(qdarkstyle.load_stylesheet())

by

app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))

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

Status:

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.

Changelog

* 1.9:
    - Improve QTabBar consistency and make selected tabs more distinctive
* 1.8:
    - Add support for QToolBox
    - Fix issue with grid line in QTableView if there is only ONE row/column
* 1.7:
    - Fix appearance of bottom tab bars (invert gradient)
    - Improve QTableView: add grid line and fix section borders
    - Fix bug #7: bug when resizing QTableView
    - Fix bug #8: text elidation no working on QDockWidget
* 1.6:
    - Improve QToolButton style
    - Add support for InstantPopup and MenuButtonPopup
    - Improve QMenu style (better spacing with icons)
    - Add __version__ to python package.
* 1.5:
    - improve QTabBar style: now works with all tab bar positions (North, South, West and East)
    - fix bug #6: hide QTabBar base to avoid stange lines at the base of the tab bar.
* 1.4: Add style.qss to qrc file, this fix issues with cx_freeze
* 1.3:
    - remove outline on button, checkbox and radio button
    - add support for closable tabs
    - better disabled buttons
    - fix QTextEdit background color to match the color of QPlainTextEdit and QLineEdit
    - better hover/selected states for QTreeView and QListView
    - add QHeaderView support
* 1.2:
   - Improve QTableView support
* 1.1:
   - Switch to MIT license
   - Add python 3 support
* 1.0:
  - First public release (LGPL v2)

Contact information:

Snapshots

Here are the snapshots of the example application:

![alt text](/screenshots/QDarkStyle example 1.png "QDarkStyle example 1") ![alt text](/screenshots/QDarkStyle example 2.png "QDarkStyle example 2")

And here is a snapshot of an internal app I made at work:

alt text

qdarkstylesheet's People

Watchers

James Cloos avatar Olivier Dalang avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.