I know that QML does not support CSS styling like widgets do, and I have read up on alternative approaches to styling/theming:
It could also be helpful to look at Qt Quick Controls Styles
When using Controls Styles it is not necessary to explicitly assign each property in the target control. All properties can be defined in a separate [ControlName]Style
component (e.g. ButtonStyle
).
Then in target component (e.g. Button
) you can just reference to style component in one line of code.
The only one downside here is that Style components are available for Qt Quick Controls only. Not for any Qt Component.