QChildEvent Class
A classe QChildEvent contém parâmetros de evento para eventos de objetos filhos. Mais...
| Cabeçalho: | #include <QChildEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core) target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
| Herdado de: | QEvent |
- Lista de todos os membros, incluindo os herdados
- QChildEvent faz parte das Classes de Eventos.
Funções públicas
| QChildEvent(QEvent::Type type, QObject *child) | |
| bool | added() const |
| QObject * | child() const |
| bool | polished() const |
| bool | removed() const |
Funções protegidas
| QChildEvent(QChildEvent &&) | |
| QChildEvent & | operator=(QChildEvent &&) |
| QChildEvent & | operator=(const QChildEvent &other) |
Descrição detalhada
Os eventos filhos são enviados imediatamente aos objetos quando filhos são adicionados ou removidos.
Em ambos os casos, você só pode contar com o fato de que o filho seja um ` QObject ` (ou, se ` QObject::isWidgetType()` retornar ` true`, um ` QWidget`). Isso ocorre porque, no caso de ` QEvent::ChildAdded `, o filho ainda não está totalmente construído; no caso de ` QEvent::ChildRemoved `, ele já pode ter sido destruído.
O manipulador desses eventos é QObject::childEvent().
Documentação das funções-membro
QChildEvent::QChildEvent(QEvent::Type type, QObject *child)
Cria um objeto de evento filho de um determinado type para o child.
type pode ser ` QEvent::ChildAdded`, ` QEvent::ChildRemoved` ou ` QEvent::ChildPolished`.
Veja também child().
[protected delete] QChildEvent::QChildEvent(QChildEvent &&)
Cria uma instância de ` QChildEvent` por meio da função `move`. Essa função foi excluída.
bool QChildEvent::added() const
Retorna ` true ` se ` type()` for ` QEvent::ChildAdded`; caso contrário, retorna `false`.
QObject *QChildEvent::child() const
Retorna o objeto filho que foi adicionado ou removido.
bool QChildEvent::polished() const
Retorna ` true ` se ` type()` for ` QEvent::ChildPolished`; caso contrário, retorna `false`.
bool QChildEvent::removed() const
Retorna ` true ` se ` type()` for ` QEvent::ChildRemoved`; caso contrário, retorna `false`.
[protected delete] QChildEvent &QChildEvent::operator=(QChildEvent &&)
A função “Move-assigns” atribui “ other ” a esta instância de “ QChildEvent ”. Essa função é excluída.
[noexcept protected default] QChildEvent &QChildEvent::operator=(const QChildEvent &other)
Copia e atribui other a esta instância 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.