本页内容

QExposeEvent Class

QExposeEvent 类包含用于暴露事件的事件参数。更多内容...

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

公共函数

QExposeEvent(const QRegion &exposeRegion)

受保护函数

QExposeEvent(QExposeEvent &&)
QExposeEvent &operator=(QExposeEvent &&)
QExposeEvent &operator=(const QExposeEvent &other)

详细说明

当窗口在“未显示”和“显示”状态之间切换时,会向其发送显示事件。

处于“已显示”状态的窗口可能对用户可见。如果窗口移出屏幕、被另一个窗口完全遮挡、被最小化或发生类似情况,则会向该窗口发送一个“显示”事件,并且 isExposed() 的值可能会变为 false。

不应使用“显式”事件进行绘制。应改用QPaintEvent 进行处理。

事件处理程序QWindow::exposeEvent() 用于接收暴露事件。

成员函数文档

[explicit] QExposeEvent::QExposeEvent(const QRegion &exposeRegion)

为给定的exposeRegion (该坐标系必须为本地坐标系)构建一个曝光事件。

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

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

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

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

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

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

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