See reproducer in https://codereview.qt-project.org/c/qt/qtbase/+/346525
Having a QStandardItemModel and a QItemSelectionModel on top of it, removal of a row with selected entries does not always trigger a selectionChanged signal in the QItemSelectionModel.
The QItemSelectionModel subscribes to the rowsAboutToBeRemoved signal. On row removal, the signal is triggered. The signal handler is called. However, the signal handler QItemSelectionModelPrivate::_q_rowsAboutToBeRemoved decides that the selection was not changed.