[Qt-interest] QSortFilterProxyModel Question

anders.bakken at nokia.com anders.bakken at nokia.com
Mon Sep 21 08:02:02 CEST 2009


There's a mapToSource function that can be used to get to the original internalId.

Anders
________________________________________
From: qt-interest-bounces at trolltech.com [qt-interest-bounces at trolltech.com] On Behalf Of ext Girish Ramakrishnan [girish at forwardbias.in]
Sent: Sunday, September 20, 2009 10:06 PM
To: Willy P; qt-interest at trolltech.com
Subject: Re: [Qt-interest] QSortFilterProxyModel Question

Hi,

Willy P wrote:
> Everything works fine b/c I've modified nothing from the parent class.
>  But I'm noticing that the values for QModelIndex::internalId are
> crazy.  Is the QSortFilterProxyModel keeping track of data itself?

QSortFilterProxyModel could probably have been designed to keep the same
internalId as the source model, but the fact is QSortFilterProxyModel
does not do that :) It maintains a data structure of it's own to keep
track of nodes in the source model and the internal ids reference that
data structure.

Girish
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list