This is driving me crazy. I have a QAbstractItemModel, QSortFilterProxyModel, and a QStyledItemDelegate. All are subclassed. After emitting the following dataChanged(), QStyledItemDelegate::paint() should be called for just those two indexes (0,0, and 0,1). However, I've confirmed it's being called for all visible cells.
void my_model_t::emit_data_changed()
{
QModelIndex start_ix = createIndex( 0, 0 );
QModelIndex end_ix = createIndex( 0, 1 );
emit( dataChanged( start_ix, end_ix ) );
}
To be sure, I have connected a slot to both my model & proxy's modelReset(), and layoutChanged() signals. It does a simple printf(). However, it is never called. I'm pretty sure I'm doing nothing funky with the view or delegate. But, not exactly sure where to look either.