<div dir="ltr">Hello<div><br></div><div>I'd suggest 1st check if its fails or not and then update the model with begin/end</div><div><br></div><div>br,</div><div>Vlad</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 27, 2020 at 10:29 PM Jonathan Purol <<a href="mailto:contact@folling.de">contact@folling.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">What would be the recommended way to abort a `begin*` calls from <br>
`QAbstractItemModel`?<br>
<br>
I have a model where inserting/removing items can fail, in which case I <br>
would like to abort the removal.<br>
What would be the best way to approach this? I've found a few rather <br>
useless threads regarding this online, but haven't found any hint in the <br>
documentation/example projects.<br>
<br>
Is it save to just ignore the `begin*Rows` if it fails? From what I've <br>
seen from the source that shouldn't be the case. And simply calling <br>
`end*Rows` would probably result in similar unwanted behaviour.<br>
<br>
Sincerely,<br>
Jonathan Purol<br>
<br>
_______________________________________________<br>
Interest mailing list<br>
<a href="mailto:Interest@qt-project.org" target="_blank">Interest@qt-project.org</a><br>
<a href="https://lists.qt-project.org/listinfo/interest" rel="noreferrer" target="_blank">https://lists.qt-project.org/listinfo/interest</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Best regards,<div>Vlad</div></div></div>