이 페이지에서

QChildEvent Class

QChildEvent 클래스에는 자식 객체 이벤트에 대한 이벤트 매개변수가 포함되어 있습니다. 더 보기...

헤더: #include <QChildEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
qmake: QT += core
상속: QEvent

공개 함수

QChildEvent(QEvent::Type type, QObject *child)
bool added() const
QObject *child() const
bool polished() const
bool removed() const

보호된 함수

QChildEvent(QChildEvent &&)
QChildEvent &operator=(QChildEvent &&)
QChildEvent &operator=(const QChildEvent &other)

상세 설명

자식 이벤트는 자식이 추가되거나 제거될 때 즉시 객체로 전송됩니다.

두 경우 모두 자식이 QObject (또는 QObject::isWidgetType()가 true 를 반환하는 경우 QWidget)임을 전제로 할 수 있습니다. 이는 QEvent::ChildAdded 의 경우 자식이 아직 완전히 생성되지 않았고, QEvent::ChildRemoved 의 경우 이미 소멸되었을 수도 있기 때문입니다.

이러한 이벤트에 대한 핸들러는 ` QObject::childEvent()`입니다.

멤버 함수 문서

QChildEvent::QChildEvent(QEvent::Type type, QObject *child)

child 에 대해 특정 type 의 하위 이벤트 객체를 생성합니다.

type QEvent::ChildAdded, 또는 일 수 있습니다. QEvent::ChildRemoved QEvent::ChildPolished

child()도 참조하십시오 .

[protected delete] QChildEvent::QChildEvent(QChildEvent &&)

QChildEvent 의 인스턴스를 move-construct로 생성합니다. 이 함수는 삭제되었습니다.

bool QChildEvent::added() const

type()의 결과가 QEvent::ChildAdded 인 경우 true 를 반환하고, 그렇지 않은 경우 false를 반환합니다.

QObject *QChildEvent::child() const

추가되거나 제거된 자식 객체를 반환합니다.

bool QChildEvent::polished() const

type()의 결과가 QEvent::ChildPolished 인 경우 true 를 반환하고, 그렇지 않은 경우 false를 반환합니다.

bool QChildEvent::removed() const

type()의 결과가 QEvent::ChildRemoved 인 경우 true 를 반환하고, 그렇지 않은 경우 false를 반환합니다.

[protected delete] QChildEvent &QChildEvent::operator=(QChildEvent &&)

other 를 이 QChildEvent 인스턴스에 이동 할당합니다. 이 함수는 삭제됩니다.

[noexcept protected default] QChildEvent &QChildEvent::operator=(const QChildEvent &other)

other 를 이 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.