QChildEvent(3qt)
π QChildEvent π β it's giving "your kid just showed up / your kid just left"
okay bestie, welcome to the qchildevent.3qt manual page, the group chat where Qt tells you when a child object gets inserted or removed. it's a whole event class. it's iconic. let's go π¦
β¨ NAME β¨
QChildEvent β the event parameters for child object events. literally just vibes about kids coming and going π
πΈ SYNOPSIS πΈ
#include <qevent.h>
Inherits QEvent. yeah she's part of the family tree π§
π Public Members π
QChildEvent ( Type type, QObject * child )
QObject * child () const
bool inserted () const
bool removed () const
π DESCRIPTION π
okay so the QChildEvent class holds the event parameters for child object events. that's the whole job. main character energy but make it a struct π«Ά
Child events get sent to objects when children are inserted or removed. it's the "new baby alert" / "they moved out" notification system for your object tree.
here's the tea though: a ChildRemoved event is sent immediately, but a ChildInserted event is posted (with QApplication::postEvent()). so one is right now, one is in the mail. not me being asynchronous π
β οΈ also important: if a child is removed immediately after it is inserted, theChildInsertedevent may be suppressed, but theChildRemovedevent will always be sent. so in that case you get aChildRemovedevent with no correspondingChildInsertedevent. the breakup text arrives, the "we're dating" text never does π
The handler for these events is QObject::childEvent(). that's where you do your thing.
See also Event Classes.
π MEMBER FUNCTION DOCUMENTATION π
π QChildEvent::QChildEvent ( Type type, QObject * child )
Constructs a child event object. child is the object that is to be removed or inserted β the little one in question π
The type parameter must be either QEvent::ChildInserted or QEvent::ChildRemoved. no third option, bestie, pick one of the two or it's not it.
π QObject * QChildEvent::child () const
Returns the child widget that was inserted or removed. that's your baby right there π₯Ί
π bool QChildEvent::inserted () const
Returns TRUE if the widget received a new child; otherwise returns FALSE. new addition to the family, slay β¨
π bool QChildEvent::removed () const
Returns TRUE if the object lost a child; otherwise returns FALSE. they left. we're fine. we're totally fine π
π¦ SEE ALSO π¦
go read those, iykyk π
π COPYRIGHT π
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. that's the receipts, periodt.
πΈ AUTHOR πΈ
Generated automatically from the source code. so nobody hand-wrote this, it just spawned, no cap π€
π BUGS π
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. (fr fr, good bug reports are the love language π)
The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. so like... it's a gift, not a contract π
If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qchildevent.3qt) and the Qt version (3.3.8). yes both of those. don't make them guess, bestie π
and that's the whole page!! this one came from Trolltech AS and it's dated 2 February 2007 β so if anyone asks, this manual page is old enough to have its own nostalgia playlist π stay hydrated, read your man pages, and remember: ChildRemoved always gets sent π
π¦ where this page comes from
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms