Yes it return a valid pointer
qDebug() << selectionModel();
output
QItemSelectionModel(0x6e39580)
qDebug() << selectionModel()->model();
output
QSortFilterProxyModel(0x6e34008)
Debug Assertion Failed!
From the stack trace, I deduce that errors occur when the QModelIndex is removed
Capture d’écran 2025-02-13 150154.png
I'm not sure if this helps, but when I manually set the selectedIndex to (0, 0), the error doesn't occur.