[Qt-interest] Accessing the source model of a QSortFilterProxyModel after filtering
Andreas Ntaflos
daff at pseudoterminal.org
Fri May 8 05:03:36 CEST 2009
Hi list,
I have a custom hierarchical tree model that provides several methods
for accessing an item's data (kind of like the record() method of a
QSqlQueryModel which returns the SQL record of a given item). I.e.
treeModel->type(QModelIndex &) returns the type of the item with the
given QModelIndex. This tree model is set as source model for a
QSortFilterProxyModel, which in turn is set as the model for a
QTreeView.
After the proxy model does its filtering I'd like to be able to call the
mentioned methods on the source model. Problem is: from where do I get
valid indexes to call e.g. the type() method on the source model? I
apparently can't use the indexes provided by the QTreeView's selection
model.
So how do I create valid indexes I can use to access the source model
after the filtering?
Hope this made sense :)
Thanks in advance,
Andreas
--
Andreas Ntaflos
Vienna, Austria
GPG Fingerprint: 6234 2E8E 5C81 C6CB E5EC 7E65 397C E2A8 090C A9B4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2494 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090508/56d0f5ef/attachment.bin
More information about the Qt-interest-old
mailing list