2012-11-05 13:42:35 -05:00
|
|
|
A dark stylesheet for Qt applications.
|
2012-08-23 08:30:23 -04:00
|
|
|
|
2012-11-05 13:42:35 -05:00
|
|
|
Screenshots
|
|
|
|
===================
|
2012-08-23 09:03:05 -04:00
|
|
|
|
2012-11-05 13:42:35 -05:00
|
|
|
**TODO: Add screenshots**
|
2012-08-23 09:03:05 -04:00
|
|
|
|
2012-11-05 13:42:35 -05:00
|
|
|
Usage
|
|
|
|
============
|
2012-08-23 09:03:05 -04:00
|
|
|
|
2012-11-05 13:42:35 -05:00
|
|
|
- Download/clone the project next to your main executable (or wherever you find it fits well)
|
2012-11-05 16:03:11 -05:00
|
|
|
- Load QDarkStyleSheets/style.qss and
|
|
|
|
- Format the stylesheet string to give it the correct location (otherwise
|
|
|
|
resources won't show).
|
|
|
|
People that don't want to format may replace all "%(location)s/" occurrences in the style.qss file by their own resource
|
|
|
|
location.
|
|
|
|
- apply it on your QApplication instance
|
|
|
|
|
|
|
|
Here is a quick snippet in python (PySide/PyQt) that shows how to use the
|
|
|
|
stylesheet.
|
2012-08-23 09:03:05 -04:00
|
|
|
|
2012-11-05 13:42:35 -05:00
|
|
|
|
|
|
|
```Python
|
|
|
|
def main():
|
|
|
|
# create the qt application
|
|
|
|
app = QApplication()
|
2012-11-05 16:03:11 -05:00
|
|
|
|
2012-11-05 13:42:35 -05:00
|
|
|
# Load the stylesheet
|
|
|
|
f = open("QDarkStyleSheet/style.qss","r")
|
|
|
|
style_sheet = f.read()
|
|
|
|
f.close()
|
2012-11-05 16:03:11 -05:00
|
|
|
|
|
|
|
# format style_sheet to get the correct resource path.
|
|
|
|
path = "" # here we use the working directory but it might somewhere else
|
|
|
|
style_sheet = style_sheet % {"location":path}
|
|
|
|
|
|
|
|
# apply the stylesheet
|
2012-11-05 13:42:35 -05:00
|
|
|
app.setStyleSheet(style_sheet)
|
|
|
|
```
|
2012-08-23 09:03:05 -04:00
|
|
|
|
|
|
|
Status:
|
|
|
|
==============
|
|
|
|
|
|
|
|
The following widgets are styled:
|
|
|
|
|
|
|
|
- QMainWindow
|
|
|
|
- QWidget
|
|
|
|
- QMenu, QMenuBar
|
|
|
|
- QToolTip
|
|
|
|
- QAbstractItemView
|
|
|
|
- QLineEdit
|
|
|
|
- QGroupBox
|
|
|
|
- QTextEdit, QPlainTextEdit
|
|
|
|
- QTreeView,
|
|
|
|
- QScrollBar
|
|
|
|
- QRadioButton
|
|
|
|
- QCheckBox
|
|
|
|
- QComboBox
|
|
|
|
- QPushButton
|
|
|
|
- QToolButton
|
|
|
|
- QToolBar
|
|
|
|
- QProgressBar
|
|
|
|
- QSpinBox
|
|
|
|
- QFrame
|
|
|
|
- QTabWidget, QTabBar
|
|
|
|
- QDockWidget
|
|
|
|
- QSlider (horizontal and vertical)
|
|
|
|
|
|
|
|
What still needs to be done:
|
|
|
|
|
|
|
|
- QAbstractScrollArea
|
|
|
|
- QSplitter
|
|
|
|
- QStatusBar
|
|
|
|
- QTableView
|
|
|
|
- QToolBox
|
|
|
|
|
|
|
|
Contact information:
|
|
|
|
===========================
|
|
|
|
|
|
|
|
- Maintainer: colin.duquesnoy@gmail.com
|
2012-11-05 16:03:11 -05:00
|
|
|
- Homepage: https://github.com/ColinDuquesnoy/QDarkStyleSheet
|