QChildWindowEvent Class
The QChildWindowEvent class contains event parameters for child window changes. More...
| Header: | #include <QChildWindowEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui)target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| Since: | Qt 6.7 |
| Inherits: | QEvent |
- List of all members, including inherited members
- QChildWindowEvent is part of Event Classes.
Public Functions
| QChildWindowEvent(QEvent::Type type, QWindow *childWindow) | |
| QWindow * | child() const |
Protected Functions
| QChildWindowEvent(QChildWindowEvent &&) | |
| QChildWindowEvent & | operator=(QChildWindowEvent &&) |
| QChildWindowEvent & | operator=(const QChildWindowEvent &other) |
Detailed Description
Child window events are sent to windows when children are added or removed.
In both cases you can only rely on the child being a 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 case it might have already been destructed.
Member Function Documentation
[explicit] QChildWindowEvent::QChildWindowEvent(QEvent::Type type, QWindow *childWindow)
Constructs a child window event object of a particular type for the childWindow.
type can be QEvent::ChildWindowAdded or QEvent::ChildWindowRemoved.
See also child().
[protected delete] QChildWindowEvent::QChildWindowEvent(QChildWindowEvent &&)
Move-constructs an instance of QChildWindowEvent. This function is deleted.
QWindow *QChildWindowEvent::child() const
Returns the child window that was added or removed.
[protected delete] QChildWindowEvent &QChildWindowEvent::operator=(QChildWindowEvent &&)
Move-assigns other to this QChildWindowEvent instance. This function is deleted.
[noexcept protected default] QChildWindowEvent &QChildWindowEvent::operator=(const QChildWindowEvent &other)
Copy-assigns other to this QChildWindowEvent instance.