PDA

View Full Version : QSortFilterProxyModel - filterKeyColumn



SirBabyface
7th September 2007, 15:57
Hello,

I'm having a problem when using a filterKeyColumn.
When I do this:

proxyModel->setFilterKeyColumn(-1);
It doesn't work.
I'm using the FixedString option.

Using a specific column it work ok, but with -1, that should be for all columns it doesn't work.
I've tried to change the example that comes with Qt, basicsortfiltermodel

I've just changed this method to this:

void Window::filterColumnChanged()
{
if (filterColumnComboBox->currentIndex() == 3)
proxyModel->setFilterKeyColumn(-1);
else
proxyModel->setFilterKeyColumn(filterColumnComboBox->currentIndex());
}
and add this line 62

filterColumnComboBox->addItem(tr("All"));

So if some ones know how to solve this problem, it would be very nice.
I'm using Windows Qt 4.3.1

SirBabyface
7th September 2007, 16:09
Problem fixed.

I've received a email from qt-bugs, at it seems to be a bug on version 4.3.1. It going to be fixed on the next version 4.3.2