A widget for selecting and displaying colors. More...
#include <ColorPicker.h>
Signals | |
void | colorChanged (const QColor &color) |
Emitted when the color changes. | |
Public Member Functions | |
ColorPicker (QWidget *parent=nullptr) | |
Constructs a ColorPicker widget. | |
QColor | color () const |
Gets the currently selected color. | |
void | setColor (const QColor &color) |
Sets the current color. | |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) override |
Handles paint events. | |
A widget for selecting and displaying colors.
Provides a button that opens a color dialog when clicked and displays the currently selected color.
|
explicit |
Constructs a ColorPicker widget.
parent | The parent widget |
QColor ColorPicker::color | ( | ) | const |
Gets the currently selected color.
|
signal |
Emitted when the color changes.
color | The new color |
|
overrideprotected |
Handles paint events.
event | The paint event |
void ColorPicker::setColor | ( | const QColor & | color | ) |
Sets the current color.
color | The color to set |