Skip to content

artem-ogre/PyQSS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pyQSS is a tool that allows embedding Python code in Qt Style Sheets (QSS) files in order to make them easier to maintain, keep consistent and dynamic.

QSS file is enhanced with Python snippets in the form of: @...@ and $...$ , where

  • @ -- python code will be executed with exec() function (good for defining variables)
  • $ -- python code will be executed with eval() function (good for including results of computations)

Additionally, a small set of utility classes and methods is provided in helpers.py. These should make integration with QSS more seamless and should be easy to extend.

A simple example is given: see file example.pyqss

To run the PyQSS on the example use the following command:

python pyQSS.py example.pyqss example_result.qss

Copyright Artem Amirkhanov 2014

Distributed under the MIT Software License (See accompanying file LICENSE.txt)

Contact the author: [email protected]

About

Enhancing Qt Style Sheets (QSS) with Python code

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages