The QPlatformSurfaceEvent class is used to notify about native platform surface events. 更多...
头: | #include <QPlatformSurfaceEvent> |
qmake: | QT += gui |
Since: | Qt 5.5 |
继承: | QEvent |
enum | SurfaceEventType { SurfaceCreated, SurfaceAboutToBeDestroyed } |
QPlatformSurfaceEvent (QPlatformSurfaceEvent::SurfaceEventType surfaceEventType ) | |
QPlatformSurfaceEvent::SurfaceEventType | surfaceEventType () const |
QPlatformSurfaceEvent::SurfaceEventType | m_surfaceEventType |
The QPlatformSurfaceEvent class is used to notify about native platform surface events.
平台窗口事件会被同步发送给窗口和屏幕外表面,当其底层本机表面被创建或即将被销毁时。
应用程序可以响应这些事件,为知道底层平台表面是否存在。
此枚举描述平台表面事件的类型。可能的类型:
常量 | 值 | 描述 |
---|---|---|
QPlatformSurfaceEvent::SurfaceCreated
|
0
|
底层本机表面已被创建 |
QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed
|
1
|
底层本机表面将被立即销毁,在此事件之后 |
The
SurfaceAboutToBeDestroyed
事件类型是在平台窗口被销毁之前,停止渲染的一种有用手段。
构造平台表面事件为给定 surfaceEventType .
返回平台表面事件的具体类型。