[Interest] Aborting `begin*` with QAbstractItemModels

Jonathan Purol contact at folling.de
Thu Feb 27 22:27:25 CET 2020


What would be the recommended way to abort a `begin*` calls from 
`QAbstractItemModel`?

I have a model where inserting/removing items can fail, in which case I 
would like to abort the removal.
What would be the best way to approach this? I've found a few rather 
useless threads regarding this online, but haven't found any hint in the 
documentation/example projects.

Is it save to just ignore the `begin*Rows` if it fails? From what I've 
seen from the source that shouldn't be the case. And simply calling 
`end*Rows` would probably result in similar unwanted behaviour.

Sincerely,
Jonathan Purol



More information about the Interest mailing list