QChildEvent Class
La clase QChildEvent contiene los parámetros de los eventos de los objetos secundarios. Más información...
| Cabecera: | #include <QChildEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| Heredado de: | QEvent |
- Lista de todos los miembros, incluidos los heredados
- QChildEvent forma parte de las clases de eventos.
Funciones públicas
| QChildEvent(QEvent::Type type, QObject *child) | |
| bool | added() const |
| QObject * | child() const |
| bool | polished() const |
| bool | removed() const |
Funciones protegidas
| QChildEvent(QChildEvent &&) | |
| QChildEvent & | operator=(QChildEvent &&) |
| QChildEvent & | operator=(const QChildEvent &other) |
Descripción detallada
Los eventos secundarios se envían inmediatamente a los objetos cuando se añaden o se eliminan elementos secundarios.
En ambos casos, solo se puede dar por hecho que el elemento secundario es un ` QObject ` (o, si ` QObject::isWidgetType()` devuelve ` true`, un ` QWidget`). Esto se debe a que, en el caso de ` QEvent::ChildAdded `, el elemento secundario aún no se ha construido por completo; en el caso de ` QEvent::ChildRemoved `, es posible que ya se haya destruido.
El controlador de estos eventos es QObject::childEvent().
Documentación de las funciones miembro
QChildEvent::QChildEvent(QEvent::Type type, QObject *child)
Crea un objeto de evento secundario de una « type » concreta para la « child ».
type Puede ser QEvent::ChildAdded, QEvent::ChildRemoved o QEvent::ChildPolished.
Véase también child().
[protected delete] QChildEvent::QChildEvent(QChildEvent &&)
Crea una instancia de ` QChildEvent`. Esta función se ha eliminado.
bool QChildEvent::added() const
Devuelve ` true ` si ` type()` es ` QEvent::ChildAdded`; en caso contrario, devuelve `false`.
QObject *QChildEvent::child() const
Devuelve el objeto secundario que se ha añadido o eliminado.
bool QChildEvent::polished() const
Devuelve ` true ` si ` type()` es ` QEvent::ChildPolished`; en caso contrario, devuelve `false`.
bool QChildEvent::removed() const
Devuelve « true » si « type()» es « QEvent::ChildRemoved »; en caso contrario, devuelve «false».
[protected delete] QChildEvent &QChildEvent::operator=(QChildEvent &&)
Asigna mediante «move» other a esta instancia de QChildEvent. Esta función se elimina.
[noexcept protected default] QChildEvent &QChildEvent::operator=(const QChildEvent &other)
Asigna por copia other a esta instancia de QChildEvent.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.