PDA

View Full Version : QListView scroll height (solved)



efegea
26th April 2009, 14:06
I have a QListView with a custom QAbstractListModel and a custom QItemDelegate.

The QListView is setup as Icon Mode. But I having a problem: the scroll area height is double it should be. I can scroll double more than the total of icons height.

I'm using Qt 4.5.0. It didn't happen on previous versions of Qt.

I think the QListView is ignoring the number of columns it creates internally as an icon view (not the model, as it is a list model and doesn't have columns) and it's showing the total of rows the model is reporting, instead of showing the number of rows divided by the number of columns (or something like that)

Perhaps I'm missing something?

EDIT: what's that about posting something and then, after having it posted, finding the solution? :confused: I had been using a QSortFilterProxyModel for the model, disabling it caused my QListView to behave how it should.