QChildEvent Class
La clase QChildEvent contiene parametros para eventos de objetos hijo. Más...
| Cabecera: | #include <QChildEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core)target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| Hereda: | QEvent |
- Lista de todos los miembros, incluyendo los heredados
- QChildEvent es parte de Clases de Eventos.
Funciones Públicas
| QChildEvent(QEvent::Type type, QObject *child) | |
| bool | added() const |
| QObject * | child() const |
| bool | polished() const |
| bool | removed() const |
Descripción Detallada
Los eventos child se envían inmediatamente a los objetos cuando se añaden o eliminan hijos.
En ambos casos sólo se puede confiar en que el hijo sea un QObject (o, si QObject::isWidgetType() devuelve true, un QWidget). Esto se debe a que en el caso QEvent::ChildAdded el hijo aún no está completamente construido; en el caso QEvent::ChildRemoved puede que ya haya sido destruido.
El manejador de estos eventos es QObject::childEvent().
Documentación de las funciones miembro
QChildEvent::QChildEvent(QEvent::Type type, QObject *child)
Construye un objeto de evento hijo de un type particular para el child.
type puede ser QEvent::ChildAdded, QEvent::ChildRemoved, o QEvent::ChildPolished.
Véase también child().
bool QChildEvent::added() const
Devuelve true si type() es QEvent::ChildAdded; en caso contrario devuelve false.
QObject *QChildEvent::child() const
Devuelve el objeto hijo 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.
© 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.