内容表

上一话题

QStyleHints

下一话题

QSurfaceFormat

QSurface

QSurface class is an abstraction of renderable surfaces in Qt. 更多

Inheritance diagram of PySide2.QtGui.QSurface

概要

虚函数

详细描述

表面尺寸是可访问的,采用 size() function. The rendering specific attributes of the surface are accessible through the format() 函数。

class QSurface ( type )
param type

SurfaceClass

创建表面,采用给定 type .

PySide2.QtGui.QSurface. SurfaceClass

The enum describes the actual subclass of the surface.

常量

描述

QSurface.Window

The surface is an instance of QWindow .

QSurface.Offscreen

The surface is an instance of QOffscreenSurface .

PySide2.QtGui.QSurface. SurfaceType

The enum describes what type of surface this is.

常量

描述

QSurface.RasterSurface

The surface is is composed of pixels and can be rendered to using a software rasterizer like Qt’s raster paint engine.

QSurface.OpenGLSurface

The surface is an OpenGL compatible surface and can be used in conjunction with QOpenGLContext .

QSurface.RasterGLSurface

The surface can be rendered to using a software rasterizer, and also supports OpenGL. This surface type is intended for internal Qt use, and requires the use of private API.

QSurface.OpenVGSurface

The surface is an OpenVG compatible surface and can be used in conjunction with OpenVG contexts.

QSurface.VulkanSurface

The surface is a Vulkan compatible surface and can be used in conjunction with the Vulkan graphics API.

QSurface.MetalSurface

The surface is a Metal compatible surface and can be used in conjunction with Apple’s Metal graphics API. This surface type is supported on macOS only.

PySide2.QtGui.QSurface. m_type
PySide2.QtGui.QSurface. format ( )
返回类型

QSurfaceFormat

返回表面的格式。

PySide2.QtGui.QSurface. size ( )
返回类型

QSize

Returns the size of the surface in pixels.

PySide2.QtGui.QSurface. supportsOpenGL ( )
返回类型

bool

Returns true if the surface is OpenGL compatible and can be used in conjunction with QOpenGLContext ;否则返回 false。

PySide2.QtGui.QSurface. surfaceClass ( )
返回类型

SurfaceClass

返回此表面的表面类。

PySide2.QtGui.QSurface. surfaceHandle ( )
返回类型

QPlatformSurface

Returns a handle to the platform-specific implementation of the surface.

PySide2.QtGui.QSurface. surfaceType ( )
返回类型

SurfaceType

返回表面的类型。