Qt World Summit: Submit your Presentation

Possible reapter bug

  • Hello i am trying to use mchart(A QML wrapper for chart.js).
    Now it needs to be passed a QList for the data i have multiple charts made by a reapter so i have stacked qlists like so:
    QList<QList<qreal>> Issue is when i use this i do the following

        id: repeater
        model: 4
             Component.onCompleted: {
                  width: parent.width + 60
                  height: 300
                  y: 290
                  anchors.horizontalCenter: parent.horizontalCenter
                  type: MChart.Type.Line
                  silent: true
                  labels: serial.labels[index]
                            values: serial.chartData[index]
                            fillColor: "#28bcd7"
                            lineColor: "#4328d7"
                            pointColor: "#2864d7"

    serial.chartData is QList<QVarient> where the QVarient is a QList<qreal>.
    serial.labels is QList<QVarient> where the QVarient is a QList<QString>.
    I get the error ReferenceError: index is not defined at serial.labels[index]
    how can this be i can use index before this, but when i use it here it doesn't work.
    Is this a bug or am i doing something wrong?