QVBarModelMapper update chart on model change
Hi,
I am using QVBarModelMapper to show a BarChart. I provided my own implementation of QAbstractTableModel.
But the BarChart does not update, when the data in the TableModel changes and dataChanged() is emitted.
What do I have to do to automatically update the BarChart, when the model changes?
Re: QVBarModelMapper update chart on model change
Could be a bug in the mapper class.
I assume you have verfied that the model works correctly? E.g. using a QTableView?
Cheers,
_
Re: QVBarModelMapper update chart on model change
Yes, i use a TableView to show the data, and it gets updated properly
Re: QVBarModelMapper update chart on model change
Hmm, you probably need to debug this then.
From the code it looks like the dataChanged signal is properly connected
https://code.woboq.org/qt5/qtcharts/...tractItemModel
Cheers,
_
Re: QVBarModelMapper update chart on model change
It works now. I called emitted the dataChanged method on the wrong part of the data set. However, the table was updated correctly so I dont know why that worked.
Thanks for your help!