Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
4.2.3
-
None
Description
The following example will have in invalid index as the input to QSortFilterProxyModel::filterAcceptRow().
#include <QtGui>
class Filter : public QSortFilterProxyModel
{
public:
Filter(QObject *parent = 0)
: QSortFilterProxyModel(parent)
{}
virtual bool filterAcceptsRow(int row, const QModelIndex &parent) const
};
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
QStandardItemModel model;
Filter proxy;
proxy.setSourceModel(&model);
QList<QStandardItem *> rows;
rows.append(new QStandardItem("foo"));
model.appendColumn(rows);
return 0;
}
I would not have expected isValid() to return false.
Update: You can work around this bug by appending rows one at a time instead of appending one column list.