I think it is not possible to subclass data in QStandardItemModel.
I just try change my own QAbstractItemModel to QStandardItemModel and data is not called either.
Try to use QAbstractItemModel. I think you have implemented almost everything you need to use QAbstractItemModel
You need to implement index and parent. Since you have no hiearchical model, parent should always return invalid index.
It can be implemented like this:
QModelIndex TickerDisplayModel::index(int row, int column, const QModelIndex &parent) const
{
return hasIndex(row, column, parent) ? createIndex(row, column, 0) : QModelIndex();
}
QModelIndex TickerDisplayModel::parent(const QModelIndex &child) const
{
return QModelIndex(); // since no hiearchy model, this should always return invalid index
}