How to use the qdarkstyle.utils.scss.create_qss function in QDarkStyle

To help you get started, we’ve selected a few QDarkStyle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ColinDuquesnoy / QDarkStyleSheet / test / test_sass_compiler.py View on Github external
def test_create_qss():
    # Should not raise a CompileError
    create_qss()
github ColinDuquesnoy / QDarkStyleSheet / scripts / process_qrc.py View on Github external
generate_qrc_file()

    print('Converting .qrc to _rc.py and/or .rcc ...')
    os.chdir(args.qrc_dir)

    for qrc_file in glob.glob('*.qrc'):
        # get name without extension
        filename = os.path.splitext(qrc_file)[0]

        print(filename, '...')
        ext = '_rc.py'
        ext_c = '.rcc'

        # Create variables SCSS files and compile SCSS files to QSS
        print('Compiling SCSS/SASS files to QSS ...')
        create_qss()

        # creating names
        py_file_pyqt5 = 'pyqt5_' + filename + ext
        py_file_pyqt = 'pyqt_' + filename + ext
        py_file_pyside = 'pyside_' + filename + ext
        py_file_pyside2 = 'pyside2_' + filename + ext
        py_file_qtpy = '' + filename + ext
        py_file_pyqtgraph = 'pyqtgraph_' + filename + ext

        # calling external commands
        if args.create in ['pyqt', 'pyqtgraph', 'all']:
            print("Compiling for PyQt4 ...")
            try:
                call(['pyrcc4', '-py3', qrc_file, '-o', py_file_pyqt])
            except FileNotFoundError:
                print("You must install pyrcc4")