QChildEvent(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– 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, the ChildInserted event may be suppressed, but the ChildRemoved event will always be sent. so in that case you get a ChildRemoved event with no corresponding ChildInserted event. 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 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