QChildWindowEvent Class

The QChildWindowEvent class contains event parameters for child window changes. 更多...

头: #include <QChildWindowEvent>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Since: Qt 6.7
继承: QEvent

公共函数

QChildWindowEvent (QEvent::Type type , QWindow * childWindow )
QWindow * child () const

详细描述

Child window events are sent to windows when children are added or removed.

在这两种情况下,依赖的子级只能是 QWindow — not any subclass thereof. This is because in the QEvent::ChildWindowAdded case the subclass is not yet fully constructed, and in the QEvent::ChildWindowRemoved 情况下,它可能已被销毁。

成员函数文档编制

[explicit] QChildWindowEvent:: QChildWindowEvent ( QEvent::Type type , QWindow * childWindow )

Constructs a child window event object of a particular type childWindow .

type 可以是 QEvent::ChildWindowAdded or QEvent::ChildWindowRemoved .

另请参阅 child ().

QWindow *QChildWindowEvent:: child () const

Returns the child window that was added or removed.