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.

ConstantValueDescription
QSurfaceFormat::DefaultColorSpace0The default, unspecified color space.
QSurfaceFormat::sRGBColorSpace1When 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.

This is an overloaded function.

Use setColorSpace(QColorSpace) instead.

Sets the colorspace to one of the predefined values.

See also colorSpace().

© 2025 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.