How to access stylesheet properties
-
Hi I am updating some custom QWidgets to properly respect styles/stylesheets and want to know the correct way to do this.
Is there a way to access the resolved stylesheet properties in the paint event?
I can access custom properties via qproperty-propertyname, and color properties that get dumped into the palette, but what about other properties like border-width/color?
I'd rather not have qproperty-border-width.I do see the data is stored on QRenderRule inside QStyleSheetStyle, but that is not exposed to the public API.
Alternatively is there a way to override QStyle in a way that custom primitives/controls can be drawn according to stylesheet inputs in situations where custom painting is preferred over raw primitives.
Thanks! -
@Mr-MinimalEffort
Unless you get a more knowledgeable answer: as far as I know stylesheet rules, and implementation, are a "black box" --- internal code which you cannot access.