QSurface¶
Synopsis¶
Functions¶
def
supportsOpenGL
()def
surfaceClass
()
Virtual functions¶
def
format
()def
size
()def
surfaceHandle
()def
surfaceType
()
Detailed Description¶
- class PySide2.QtGui.QSurface(type)¶
- param type:
Creates a surface with the given
type
.
- PySide2.QtGui.QSurface.SurfaceClass¶
The enum describes the actual subclass of the surface.
Constant
Description
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.
Constant
Description
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()¶
- Return type:
Returns the format of the surface.
- PySide2.QtGui.QSurface.size()¶
- Return type:
Returns the size of the surface in pixels.
- PySide2.QtGui.QSurface.supportsOpenGL()¶
- Return type:
bool
Returns true if the surface is OpenGL compatible and can be used in conjunction with
QOpenGLContext
; otherwise returns false.
- PySide2.QtGui.QSurface.surfaceClass()¶
- Return type:
Returns the surface class of this surface.
- PySide2.QtGui.QSurface.surfaceHandle()¶
- Return type:
QPlatformSurface
Returns a handle to the platform-specific implementation of the surface.
- PySide2.QtGui.QSurface.surfaceType()¶
- Return type:
Returns the type of the surface.
© 2022 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.