Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtCore More...
#include <qcoreevent.h>
Public Member Functions | |
QChildEvent (Type type, QObject *child) | |
Constructs a child event object of a particular type for the child. | |
QObject * | child () const |
Returns the child object that was added or removed. | |
bool | added () const |
Returns true if type() is QEvent::ChildAdded; otherwise returns false. | |
bool | polished () const |
Returns true if type() is QEvent::ChildPolished; otherwise returns false. | |
bool | removed () const |
Returns true if type() is QEvent::ChildRemoved; otherwise returns false. | |
Public Member Functions inherited from QEvent | |
QEvent (Type type) | |
Constructs an event object of type type. | |
virtual | ~QEvent () |
Destroys the event. | |
Type | type () const |
Returns the event type. | |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false . | |
virtual void | setAccepted (bool accepted) |
bool | isAccepted () const |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). | |
bool | isInputEvent () const noexcept |
bool | isPointerEvent () const noexcept |
bool | isSinglePointEvent () const noexcept |
virtual QEvent * | clone () const |
Creates and returns an identical copy of this event. | |
Protected Attributes | |
QObject * | c |
Protected Attributes inherited from QEvent | |
quint16 | t |
\inmodule QtCore
The QChildEvent class contains event parameters for child object events.
Child events are sent immediately to objects when children are added or removed.
In both cases you can only rely on the child being a QObject (or, if QObject::isWidgetType() returns true
, a QWidget). This is because in the QEvent::ChildAdded case the child is not yet fully constructed; in the QEvent::ChildRemoved case it might have already been destructed.
The handler for these events is QObject::childEvent().
Definition at line 384 of file qcoreevent.h.
Constructs a child event object of a particular type for the child.
type can be QEvent::ChildAdded, QEvent::ChildRemoved, or QEvent::ChildPolished.
Definition at line 606 of file qcoreevent.cpp.
|
inline |
Returns true
if type() is QEvent::ChildAdded; otherwise returns false.
Definition at line 391 of file qcoreevent.h.
|
inline |
Returns the child object that was added or removed.
Definition at line 390 of file qcoreevent.h.
|
inline |
Returns true
if type() is QEvent::ChildPolished; otherwise returns false.
Definition at line 392 of file qcoreevent.h.
|
inline |
Returns true
if type() is QEvent::ChildRemoved; otherwise returns false.
Definition at line 393 of file qcoreevent.h.
|
protected |
Definition at line 396 of file qcoreevent.h.