Hi Mike,

QStyleSheets are pretty limited, so we:

- load a sass file from Qt resources,

- inject some calculated variables at the start relating to the specific app and client screen size,

- process the sass to css

- set the output into QApplication.

This occurs at startup, and whenever the screen changes.

Hope that helps, Tony


On 22/05/2018 1:17 AM, Christian Ehrlicher wrote:
Am 21.05.2018 um 15:47 schrieb Michael Jackson:
Just to confirm, but does Qt accept CSS variables as describe here: <https://www.w3schools.com/css/css3_variables.asp> ?

I tried and I get the error that the style sheet could not be parsed. I have a style sheet with a LOT of color settings and having to do a bunch of search/replace to change the colors is error prone at best.

http://doc.qt.io/qt-5/stylesheet-reference.html should be your reference.

Christian

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to