QPlatformSurfaceEvent 类

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 (SurfaceEventType surfaceEventType )
SurfaceEventType surfaceEventType () const

额外继承成员

详细描述

QPlatformSurfaceEvent class is used to notify about native platform surface events.

平台窗口事件会被同步发送给窗口和屏幕外表面,当其底层本机表面被创建或即将被销毁时。

应用程序可以响应这些事件,为知道底层平台表面是否存在。

成员类型文档编制

enum QPlatformSurfaceEvent:: SurfaceEventType

此枚举描述平台表面事件的类型。可能的类型:

常量 描述
QPlatformSurfaceEvent::SurfaceCreated 0 底层本机表面已被创建
QPlatformSurfaceEvent::SurfaceAboutToBeDestroyed 1 底层本机表面将被立即销毁,在此事件之后

SurfaceAboutToBeDestroyed 事件类型是在平台窗口被销毁之前,停止渲染的一种有用手段。

成员函数文档编制

QPlatformSurfaceEvent:: QPlatformSurfaceEvent ( SurfaceEventType surfaceEventType )

构造平台表面事件为给定 surfaceEventType .

SurfaceEventType QPlatformSurfaceEvent:: surfaceEventType () const

返回平台表面事件的具体类型。