PySide6.QtGui.QShaderKey

class QShaderKey

Specifies the shading language, the version with flags, and the variant.

Details

A default constructed QShaderKey has source set to SpirvShader and sourceVersion set to 100. sourceVariant defaults to StandardShader.

Note

This is a RHI API with limited compatibility guarantees, see QShader for details.

Added in version 6.6.

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

__init__()
__init__(s, sver[, svar=QShader.StandardShader])
Parameters:

Constructs a new QShaderKey with shader type s, version sver, and variant svar.

__ne__(rhs)
Parameters:

rhsQShaderKey

Return type:

bool

Returns false if the values in the two QShaderKey objects lhs and rhs are equal; otherwise returns true.

__lt__(rhs)
Parameters:

rhsQShaderKey

Return type:

bool

Returns true if lhs is smaller than rhs.

Establishes a sorting order between the two keys lhs and rhs.

__eq__(rhs)
Parameters:

rhsQShaderKey

Return type:

bool

Returns true if the two QShaderKey objects lhs and rhs are equal.

setSource(s)
Parameters:

sSource

Sets the shader type s.

See also

source()

setSourceVariant(svar)
Parameters:

svarVariant

Sets the type of variant to use to svar.

See also

sourceVariant()

setSourceVersion(sver)
Parameters:

sverQShaderVersion

Sets the shading language version sver.

See also

sourceVersion()

source()
Return type:

Source

Returns the shader type.

See also

setSource()

sourceVariant()
Return type:

Variant

Returns the type of the variant to use.

sourceVersion()
Return type:

QShaderVersion

Returns the shading language version.