Hi anda, thanks for your response. 
I have indeed tried that. Going down that route causes an assert to fire in QSortFilterProxyModelPrivate::index_to_iterator. The following code sample highlights it.
inline QHash<QModelIndex, Mapping *>::const_iterator index_to_iterator(
{
Q_ASSERT(proxy_index.isValid());
Q_ASSERT(proxy_index.model() == q_func());
const void *p = proxy_index.internalPointer();
Q_ASSERT(p);
QHash<QModelIndex, Mapping *>::const_iterator it =
static_cast<const Mapping*>(p)->map_iter;
Q_ASSERT(it != source_index_mapping.constEnd()); // <<-- Asserts here.
Q_ASSERT(it.value());
return it;
}
inline QHash<QModelIndex, Mapping *>::const_iterator index_to_iterator(
const QModelIndex &proxy_index) const
{
Q_ASSERT(proxy_index.isValid());
Q_ASSERT(proxy_index.model() == q_func());
const void *p = proxy_index.internalPointer();
Q_ASSERT(p);
QHash<QModelIndex, Mapping *>::const_iterator it =
static_cast<const Mapping*>(p)->map_iter;
Q_ASSERT(it != source_index_mapping.constEnd()); // <<-- Asserts here.
Q_ASSERT(it.value());
return it;
}
To copy to clipboard, switch view to plain text mode
If it is of any help, I've also included the callstack.
> QtGuid4.
dll!QSortFilterProxyModelPrivate
::index_to_iterator(const QModelIndex & proxy_index
) Line
174 + 0x8 bytes C
++ QtCored4.
dll!QModelIndex::parent() Line
374 + 0x55 bytes C
++ QtGuid4.
dll!QTreeView::updateGeometries() Line
2706 C
++ QtGuid4.
dll!QTreeView::doItemsLayout() Line
2046 C
++ QtGuid4.
dll!QWidget::event(QEvent * event
) Line
8802 + 0x10 bytes C
++ QtGuid4.
dll!QFrame::event(QEvent * e
) Line
538 + 0xc bytes C
++ QtGuid4.
dll!QApplicationPrivate
::notify_helper(QObject * receiver,
QEvent * e
) Line
4538 + 0x11 bytes C
++ QtCored4.
dll!QEventDispatcherWin32
::event(QEvent * e
) Line
1117 + 0x10 bytes C
++ QtGuid4.
dll!QApplicationPrivate
::notify_helper(QObject * receiver,
QEvent * e
) Line
4538 + 0x11 bytes C
++ QtCored4.
dll!QCoreApplicationPrivate
::sendPostedEvents(QObject * receiver,
int event_type, QThreadData
* data
) Line
1481 + 0xd bytes C
++ QtCored4.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, unsigned int wp, long lp) Line 477 + 0x10 bytes C++
user32.dll!_InternalCallWinProc@20() + 0x23 bytes
> QtGuid4.dll!QSortFilterProxyModelPrivate::index_to_iterator(const QModelIndex & proxy_index) Line 174 + 0x8 bytes C++
QtGuid4.dll!QSortFilterProxyModel::parent(const QModelIndex & child) Line 1639 C++
QtCored4.dll!QModelIndex::parent() Line 374 + 0x55 bytes C++
QtGuid4.dll!QTreeView::isIndexHidden(const QModelIndex & index) Line 2854 + 0x26 bytes C++
QtGuid4.dll!QTreeView::visualRect(const QModelIndex & index) Line 1026 + 0x27 bytes C++
QtGuid4.dll!QAbstractItemView::updateEditorGeometries() Line 2597 + 0x24 bytes C++
QtGuid4.dll!QAbstractItemView::updateGeometries() Line 2632 C++
QtGuid4.dll!QTreeView::updateGeometries() Line 2706 C++
QtGuid4.dll!QAbstractItemView::doItemsLayout() Line 1146 C++
QtGuid4.dll!QTreeView::doItemsLayout() Line 2046 C++
QtGuid4.dll!QAbstractItemView::timerEvent(QTimerEvent * event) Line 2424 C++
QtGuid4.dll!QTreeView::timerEvent(QTimerEvent * event) Line 1192 C++
QtCored4.dll!QObject::event(QEvent * e) Line 1139 C++
QtGuid4.dll!QWidget::event(QEvent * event) Line 8802 + 0x10 bytes C++
QtGuid4.dll!QFrame::event(QEvent * e) Line 538 + 0xc bytes C++
QtGuid4.dll!QAbstractScrollArea::event(QEvent * e) Line 977 + 0xc bytes C++
QtGuid4.dll!QAbstractItemView::event(QEvent * event) Line 1562 C++
QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e) Line 4538 + 0x11 bytes C++
QtGuid4.dll!QApplication::notify(QObject * receiver, QEvent * e) Line 4503 + 0x10 bytes C++
QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver, QEvent * event) Line 857 + 0x15 bytes C++
QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver, QEvent * event) Line 212 + 0x39 bytes C++
QtCored4.dll!QEventDispatcherWin32::event(QEvent * e) Line 1117 + 0x10 bytes C++
QtGuid4.dll!QApplicationPrivate::notify_helper(QObject * receiver, QEvent * e) Line 4538 + 0x11 bytes C++
QtGuid4.dll!QApplication::notify(QObject * receiver, QEvent * e) Line 3920 + 0x10 bytes C++
QtCored4.dll!QCoreApplication::notifyInternal(QObject * receiver, QEvent * event) Line 857 + 0x15 bytes C++
QtCored4.dll!QCoreApplication::sendEvent(QObject * receiver, QEvent * event) Line 212 + 0x39 bytes C++
QtCored4.dll!QCoreApplicationPrivate::sendPostedEvents(QObject * receiver, int event_type, QThreadData * data) Line 1481 + 0xd bytes C++
QtCored4.dll!qt_internal_proc(HWND__ * hwnd, unsigned int message, unsigned int wp, long lp) Line 477 + 0x10 bytes C++
user32.dll!_InternalCallWinProc@20() + 0x23 bytes
To copy to clipboard, switch view to plain text mode
Bookmarks