[Interest] findChildren() in destroyed() signal slot
Thiago Macieira
thiago.macieira at intel.com
Mon Mar 19 16:52:51 CET 2012
On segunda-feira, 19 de março de 2012 11.34.02, Jason Cipriani wrote:
> I am new to Qt. I have two QObject-derived classes, Parent and Child.
> Child's parent is a Parent. When I attach a slot in Parent to Child's
> destroyed() signal, I see that Parent's findChildren() does not include the
> Child that was destroyed. This is what I want. Calling findChildren() in a
> destroyed() handler, and assuming the child won't be in the list, is safe,
> right?
Don't assume that.
The order in which the signal and the child deletion is run could change in a
different version.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120319/1ecb4d2e/attachment.sig>
More information about the Interest
mailing list