Engo
Engo

Reputation: 969

How to get the source model of a QSortFilterProxyModel in Qt?

I have a QStandardItemModel that is set as source of QSortFilterProxyModel using setSourceModel().

How can I access the QStandardItemModel? I need to know this in order to iterate over the unmodified data.

Upvotes: 1

Views: 2393

Answers (1)

Apin
Apin

Reputation: 2668

yourQSortFilterProxyModelinstance->sourceModel() and cast it to QStandardItemModel*

Upvotes: 4

Related Questions