ColorGradient QML Type
定义颜色渐变。更多...
| Import Statement: | import QtDataVisualization 1.12 |
| Since: | QtDataVisualization 1.0 |
| Status: | Deprecated |
此类型已弃用。我们强烈建议不要在新代码中使用它。
属性
- stops : list<ColorGradientStop>
详细说明
渐变由两种或多种颜色定义,这些颜色将无缝融合。
颜色通过一组ColorGradientStop 子项指定,每个子项定义了在0.0到1.0之间的渐变位置以及一种颜色。每个ColorGradientStop 的位置通过设置其position 属性来定义;其颜色则通过color 属性定义。
如果渐变没有渐变停止点,则会回退到QLinearGradient 默认值,即 0.0 处为黑色,1.0 处为白色。
另请参阅 ColorGradientStop 。
属性文档
stops : list<ColorGradientStop> [default]
该属性存储描述渐变的渐变停点。
默认情况下,该属性包含一个空列表。
要设置渐变停点,请将其定义为ColorGradient 的子元素。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.