PDA

View Full Version : sizeHints for QSortFilterProxyModel



Goug
18th April 2012, 22:18
Hi, everyone,

The sizeHint method isn't documented for QSortFilterProxyModel. It accepts a column, and it's being called, but it isn't clear to me whether the column is a column in the source model or a column in the proxy model. Other methods in this class where the column is provided (filterAcceptsColumn, for example) uses the source column. I would expect this to be consistent, but I'm also having all sorts of problems getting my column widths working properly.

The QSortFilterProxyModel doesn't appear to provide the ability to map a column to the source, so I think I have to assume this is already a source column. I had the idea of mapping a model index to the source where I've set the column to the input and used row 0, but that won't work if the source doesn't have any rows.

Can anyone clarify this?

Thanks,
Doug

Goug
22nd April 2012, 02:20
I'm an idiot. sizeHint in this instance is my own addition, and I'd forgotten that. Please disregard.