QSS Theme

作者: 绍重先 | 来源:发表于2018-03-06 22:30 被阅读0次

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

    相关文章

      网友评论

          本文标题:QSS Theme

          本文链接:https://www.haomeiwen.com/subject/vdcdfftx.html