Simple widget which shows the current color as its background color.
#include <Workspace/Widgets/colorwidget.h>
Inherits QFrame.
◆ ColorWidget()
Constructs a widget with a default color of black.
◆ getColor()
const QColor & getColor |
( |
| ) |
const |
- Returns
- The current color color.
◆ paintEvent()
void paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotected |
◆ setColor
void setColor |
( |
const QColor & |
color | ) |
|
|
slot |
- Parameters
-
color | The new color this widget should show. |
Calling this function will update the widget.
◆ color