[Qt-interest] Data has to be valid on rowsAboutToBeRemoved?
Arnold Krille
arnold at arnoldarts.de
Fri May 15 18:47:00 CEST 2009
On Friday 15 May 2009 18:26:35 Emil Eriksson wrote:
> Is it required that the data (retrieved by data()) is valid when
> beginRemoveRows is called or is it only required that the model states
> that there ARE rows?
> I don't know if you understand what I mean, but I'm wondering if an
> object can remove itself in its destructor. This means that when
> beginRemovRows is called,
> part of the object is already destroyed but it is still there in the model.
I can't really say that I fully understand your question. But as far as my
understanding of the model/view in Qt goes, there shouldn't come any data-
retrieving calls to your model between calls to begin*() and end*(). Not in
the sense that you have to make sure they are not happening, but in the sense
that qt itself makes sure that no view tries to update itself before the
changes are done...
Does that help you?
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090515/6d5ce80c/attachment.bin
More information about the Qt-interest-old
mailing list