LinearGradient QML Type

线性梯度。更多

Import Statement: import QtQuick.Shapes 1.9
Inherits:

ShapeGradient

属性

  • x1 : real
  • x2 : real
  • y1 : real
  • y2 : real

详细说明

线性渐变在 "形状 "项的起点和终点之间插入颜色。在这些点之外,梯度会根据展开类型进行填充、反射或重复。

注: LinearGradient 仅支持与 "形状 "项结合使用。它与Rectangle 不兼容,因为 仅支持Gradient

另请参阅 QLinearGradient

属性文档

x1 : real

x2 : real

y1 : real

y2 : real

这些属性定义了颜色插值的起点和终点。默认情况下,这两个点都设置为(0,0)。


© 2025 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.