- Qt 6.10
- Qt GUI
- C++ Classes
- QSurfaceFormat
- Qt 6.10.2 Reference Documentation

# Obsolete Members for QSurfaceFormat

The following members of class QSurfaceFormat are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

## Public Types

`(deprecated in 6.0)` enum | ColorSpace { DefaultColorSpace, sRGBColorSpace }

## Public Functions

`(deprecated in 6.0)` void | setColorSpace(QSurfaceFormat::ColorSpace colorSpace)

## Member Type Documentation

### `[deprecated in 6.0]` enum QSurfaceFormat::ColorSpace

This enum is deprecated since 6.0. We strongly advise against using it in new code.

Use setColorSpace(QColorSpace) instead

This enum is used to specify the preferred color space, controlling if the window's associated default framebuffer is able to do updates and blending in a given encoding instead of the standard linear operations.

Constant | Value | Description
--- | --- | ---
`QSurfaceFormat::DefaultColorSpace` | `0` | The default, unspecified color space.
`QSurfaceFormat::sRGBColorSpace` | `1` | When `GL_ARB_framebuffer_sRGB` or `GL_EXT_framebuffer_sRGB` is supported by the platform and this value is set, the window will be created with an sRGB-capable default framebuffer. Note that some platforms may return windows with a sRGB-capable default framebuffer even when not requested explicitly.

## Member Function Documentation

### `[deprecated in 6.0]` void QSurfaceFormat::setColorSpace(QSurfaceFormat::ColorSpace colorSpace)

This function is deprecated since 6.0. We strongly advise against using it in new code.

Use setColorSpace(QColorSpace) instead.

Sets the colorspace to one of the predefined values.

This is an overloaded function.

See also colorSpace().