https://wiki.qt.io/Gallery_of_Qt_CSS_Based_Styles
https://github.com/ColinDuquesnoy/QDarkStyleSheet
- Python
From PyPI: Get the lastest 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
-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_()
网友评论