QChildWindowEvent 类

QChildWindowEvent 类包含用于子级窗口改变的事件参数。 更多...

头: #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

详细描述

子级窗口事件被发送给窗口,当子级被添加 (或移除)。

在这 2 种情况下,只能依赖的子级是 QWindow — 不是其任何子类。这是因为在 QEvent::ChildWindowAdded case the subclass is not yet fully constructed, and in the QEvent::ChildWindowRemoved 情况下,它可能已被销毁。

成员函数文档编制

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

构造子级窗口事件对象针对特定 typechildWindow .

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

另请参阅 child ().

QWindow *QChildWindowEvent:: child () const

返回被添加 (或移除) 的子级窗口。