Hello I'd suggest 1st check if its fails or not and then update the model with begin/end
br, Vlad On Thu, Feb 27, 2020 at 10:29 PM Jonathan Purol <cont...@folling.de> wrote: > 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 > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest > -- Best regards, Vlad
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest