The model index might have become invalid.

Basically model indexes are only considere valid as long as the model doesn't change or something else has happend, e.g. events have been processed.
The latter happens inside the message box.

You could try storing the index in a QPersitantModelIndex before you go into the nested event loop.

Ideally of course the model wouldn't use a message box with a nested event loop at all.

Cheers,
_