How to implement custon control to play well with any style?
-
Hi
I'm creating a custom qml component - simple qml file.
How do I access current style properties, to play well with it?A user may use Material/Whatever Light/Dark/other style and I want to match the style, so my component will look properly (at least colors are not completely mixed up)
Is there any way to do that?
I've tried to useApplicationWindow.window.palette, but it does not contain current stylepalette- there is almost white color (#eff0f1) forpalette.window, while using Material Dark style.I may use a Material or other style attached property, but it binds my component to only one style.
-
Hi
I'm creating a custom qml component - simple qml file.
How do I access current style properties, to play well with it?A user may use Material/Whatever Light/Dark/other style and I want to match the style, so my component will look properly (at least colors are not completely mixed up)
Is there any way to do that?
I've tried to useApplicationWindow.window.palette, but it does not contain current stylepalette- there is almost white color (#eff0f1) forpalette.window, while using Material Dark style.I may use a Material or other style attached property, but it binds my component to only one style.
@travnick
the Material style also has an attached property