本页内容

QShowEvent Class

QShowEvent 类提供了一个事件,该事件在小部件显示时触发。更多内容...

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

公共函数

受保护函数

QShowEvent(QShowEvent &&)
QShowEvent &operator=(QShowEvent &&)
QShowEvent &operator=(const QShowEvent &other)

详细说明

显示事件有两种:由窗口系统引发的显示事件(自发)和内部显示事件。 自发(QEvent::spontaneous())显示事件在窗口系统显示窗口后立即发送;当顶级窗口在被图标化后重新显示时,也会发送此类事件。内部显示事件在小部件变得可见之前立即发送。

另请参阅 QHideEvent 。

成员函数文档

QShowEvent::QShowEvent()

创建一个 QShowEvent 对象。

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

通过移动构造一个QShowEvent 实例。该函数已被删除。

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

将other 按“移动赋值”方式赋值给此QShowEvent 实例。该函数已被删除。

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

将other 复制并赋值给此QShowEvent 实例。

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