如何在 qtquickcontrols2.conf 中定义颜色的阴影?

How to define the color's shade in qtquickcontrols2.conf?

我正在尝试在 qtquickcontrols2.conf 文件中定义我的应用程序的样式,如下所示:

[Controls]
Style=Material

[Material]
Theme=Light
Variant=Dense
Accent=DeepOrange
Primary=Indigo
Foreground=Blue
Background=Grey

对于四种颜色(AccentPrimaryForegroundBackground)中的每一种,我还想指定 shade。但是我找不到我应该使用的语法。

这可能吗?如何实现?

目前不可能。您可以在根对象上设置它:

ApplicationWindow {
    // ...

    Material.foreground: Material.color(Material.Blue, Material.ShadeA100)
}

这将传播到应用程序中的所有其他控件。