Foundations
Data models
Supply data to list, table, and chart views while your application keeps ownership of it.
Item models
ListView, TreeView, and DataGrid use QAbstractItemModel and QItemSelectionModel. The application owns the model; changes made through the model's API update every view that shows it.
Chart models
Every chart reads its points from a borrowed ChartModel. Call setPoints(), or build a ChartData snapshot on a worker thread and publish it with setDataSnapshot(). Several charts can share one model.
#include <FluentQt/Charts.h>
auto* model = new fluent::charts::ChartModel(this);
model->setName("CPU");
model->setPoints({QPointF(0, 32), QPointF(1, 48), QPointF(2, 41)});
lineChart->setModel(model);import fluentqt
from PySide6.QtCore import QPointF
model = fluentqt.ChartModel(window)
model.setPoints([QPointF(0, 32), QPointF(1, 48), QPointF(2, 41)])
line_chart.setModel(model)