QgsColorBox class

A color box widget.

This widget consists of a two dimensional rectangle filled with color variations, where a different color component varies along both the horizontal and vertical axis.

Base classes

class QgsColorWidget
A base class for interactive color widgets.

Constructors, destructors, conversion operators

QgsColorBox(QWidget* parent = nullptr, ColorComponent component = Value)
Construct a new color box widget.

Public functions

void setComponent(ColorComponent component) override
Sets the color component which the widget controls.

Function documentation

QgsColorBox::QgsColorBox(QWidget* parent = nullptr, ColorComponent component = Value)

Construct a new color box widget.

Parameters
parent parent QWidget for the widget
component constant color component for the widget. The color components which vary along the horizontal and vertical axis are automatically assigned based on this constant color component.

void QgsColorBox::setComponent(ColorComponent component) override

Sets the color component which the widget controls.

Parameters
component color component for widget