编写QSS
class QSSLoader:
def __init__(self):
pass
@staticmethod
def read_qss_file(qss_file_name):
with open(qss_file_name, 'r', encoding='UTF-8') as file:
return file.read()
app = QApplication(sys.argv)
window = MainWindow()
style_file = './style.qss'
style_sheet = QSSLoader.read_qss_file(style_file)
window.setStyleSheet(style_sheet)
window.show()
sys.exit(app.exec_())
Azure界面
https://gitee.com/qmckw/Azure-ttk-theme
qt-material
git clone https://github.com/UN-GCPDS/qt-material.git
cd qt-material
python setup.py install
cd examples/full_features
python main.py --pyside6
QDarkStyleSheet
git clone https://github.com/ColinDuquesnoy/QDarkStyleSheet
cd QDarkStyleSheet
python setup.py install
飞扬青云-QSS
git clone https://github.com/feiyangqingyun/QWidgetDemo.git
cd QWidgetDemo
python setup.py install
15个案例
https://github.com/learnpyqt/15-minute-apps
QSS对比
原版
Ubuntu.qss
MaterialDark.qss
PyDracula
git clone https://github.com/Wanderson-Magalhaes/Modern_GUI_PyDracula_PySide6_or_PyQt6.git
cd Modern_GUI_PyDracula_PySide6_or_PyQt6
python setup.py build
非常漂亮的ui
PyOneDark
git clone https://github.com/Wanderson-Magalhaes/PyOneDark_Qt_Widgets_Modern_GUI.git
qtawesome
git clone https://github.com/spyder-ide/qtawesome.git
python example.py draw=glyphrun
qta-browser
参考
https://www.zhihu.com/question/26492283