summaryrefslogtreecommitdiffstats
path: root/doc/src/hpiemodelmapper.qdocinc
blob: 3320bb9956d843318204c6952a78776015567019 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
HPieModelMapper allows you to use your own QAbstractItemModel derived model with data in rows as a data source
for a pie series. It is possible to use both QAbstractItemModel and PieSeries data API to manipulate data.
HPieModelMapper keeps the Pie and the model in sync.

The following QML example would create a pie series with four slices (assuming the model has
at least five columns). Each slice would contain a label from row 1 and a value from row 2.
\code
    HPieModelMapper {
        series: pieSeries
        model: customModel
        labelsRow: 1
        valuesRow: 2
        firstColumn: 1
        columnCount: 4
    }
\endcode