QPlatformSurfaceEvent Class
QPlatformSurfaceEvent 类用于通知本机平台的表面事件。更多内容...
| 头文件: | #include <QPlatformSurfaceEvent> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
| qmake: | QT += gui |
| 继承自: | QEvent |
- 所有成员列表(包括继承的成员)
- QPlatformSurfaceEvent 属于事件类。
公共类型
| enum | SurfaceEventType { SurfaceCreated, SurfaceAboutToBeDestroyed } |
公共函数
| QPlatformSurfaceEvent(QPlatformSurfaceEvent::SurfaceEventType surfaceEventType) | |
| QPlatformSurfaceEvent::SurfaceEventType | surfaceEventType() const |
受保护函数
| QPlatformSurfaceEvent(QPlatformSurfaceEvent &&) | |
| QPlatformSurfaceEvent & | operator=(QPlatformSurfaceEvent &&) |
| QPlatformSurfaceEvent & | operator=(const QPlatformSurfaceEvent &other) |
成员类型文档
enum QPlatformSurfaceEvent::SurfaceEventType
此枚举描述了平台表面事件的类型。可能的类型包括:
| 常量 | 值 | 描述 |
|---|---|---|
QPlatformSurfaceEvent::SurfaceCreated | 0 | 底层本机画布已创建 |
QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed | 1 | 底层本机表面将在该事件发生后立即被销毁 |
SurfaceAboutToBeDestroyed 事件类型可用于在平台窗口被销毁之前停止对其的渲染。
成员函数文档
[explicit] QPlatformSurfaceEvent::QPlatformSurfaceEvent(QPlatformSurfaceEvent::SurfaceEventType surfaceEventType)
为给定的surfaceEventType 构建一个平台表面事件。
[protected delete] QPlatformSurfaceEvent::QPlatformSurfaceEvent(QPlatformSurfaceEvent &&)
通过移动构造一个QPlatformSurfaceEvent 实例。该函数已被删除。
QPlatformSurfaceEvent::SurfaceEventType QPlatformSurfaceEvent::surfaceEventType() const
返回平台表面事件的具体类型。
[protected delete] QPlatformSurfaceEvent &QPlatformSurfaceEvent::operator=(QPlatformSurfaceEvent &&)
将other 按移动赋值方式赋值给此QPlatformSurfaceEvent 实例。该函数已被删除。
[noexcept protected default] QPlatformSurfaceEvent &QPlatformSurfaceEvent::operator=(const QPlatformSurfaceEvent &other)
将 `other ` 复制并赋值给此 `QPlatformSurfaceEvent ` 实例。
© 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.