PySide6.QtGui.QPlatformSurfaceEvent

class QPlatformSurfaceEvent

QPlatformSurfaceEvent 类用于通知原生平台表面事件。更多

PySide6.QtGui.QPlatformSurfaceEvent 的继承图

概要

方法

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

平台窗口事件在创建或即将销毁其底层原生表面时,会同步发送到窗口和离屏表面。

应用程序可以响应这些事件,以了解底层平台表面何时存在。

class SurfaceEventType

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

常量

描述

QPlatformSurfaceEvent.SurfaceCreated

底层原生表面已创建

QPlatformSurfaceEvent.SurfaceAboutToBeDestroyed

底层原生表面将在此事件后立即被销毁

SurfaceAboutToBeDestroyed 事件类型在平台窗口被销毁之前停止渲染时非常有用。

__init__(surfaceEventType)
Parameters:

surfaceEventTypeQPlatformSurfaceEvent

为给定的surfaceEventType构建一个平台表面事件。

surfaceEventType()
Return type:

SurfaceEventType

返回特定类型的平台表面事件。