QHideEvent Class

QHideEvent 类提供了一个在部件隐藏后发送的事件。更多

头文件: #include <QHideEvent>
CMake.QHideEvent find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
继承: QEvent

公共函数

详细说明

该事件会在QWidget::hide() 返回前发送,也会在用户隐藏(图标化)顶层窗口时发送。

如果spontaneous() 为 true,则事件源于应用程序外部。在这种情况下,用户使用窗口管理器控件隐藏了窗口,要么将窗口图标化,要么切换到窗口不可见的另一个虚拟桌面。窗口将被隐藏,但不会退出。如果窗口被图标化,QWidget::isMinimized() 返回true

另请参阅 QShowEvent

成员函数文档

QHideEvent::QHideEvent()

构造一个 QHideEvent。

© 2025 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.