VXYModelMapper QML Type
Import Statement: | import QtCharts 2.9 |
In C++: | QVXYModelMapper |
属性
详细说明
模型映射器可将源自QAbstractItemModel 类的数据模型用作图表的数据源。垂直模型映射器用于在直线、样条线或散点图系列与数据模型之间建立连接,数据模型的X和Y列表示坐标,XYSeries 的数据点表示行。自然可以选择TableModel作为模型。
模型和序列属性都可用于操作数据。模型映射器可使系列和数据模型保持同步。
另请参阅 HXYModelMapper,XYSeries, 以及带 Widgets 图库的图表。
属性文档
firstRow : int |
模型中包含系列第一点数据的行。默认值为 0。
model : SomeModel |
映射器使用的数据模型。您需要实现该模型并将其公开给 QML。
注意: 模型必须支持添加和删除行或列,以及修改单元格中的数据。
rowCount : int |
映射为系列数据的模型行数。默认值为-1(行数受模型行数限制)。
series : XYSeries |
映射器使用的系列。在向映射器设置序列时,序列中的所有数据都会被丢弃。当指定一个新系列时,旧系列将被断开(但保留其数据)。
xColumn : int |
模型中包含数据点 x 坐标的列。默认值为-1(映射无效)。
yColumn : int |
模型中包含数据点 y 坐标的列。默认值为-1(映射无效)。
© 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.