ListView { id: view model: skillModel delegate: SkillDelegate { width: ListView.view.width name: model.name + ' -' time.text: model.hours + ':' + model.minutes + ':' + model.seconds today.text: ' +' + model.todayHours + ':' + model.todayMinutes + ':' + model.todaySeconds pomodoroCount: model.pomodoros } } 

ListView reads data through a class derived from QAbstractListModel . How to update the data in ListView after changing it? I change the data in qml through the Q_INVOKABLE function on the c ++ side.

  • 2
    If you correctly implemented QAbstractListModel , then everything will work correctly. Read the documentation for this class. - ixSci

1 answer 1

It was necessary to implement the dataChanged () signal of the parent class of the model.