QCustomColorPicker
A colour selector.
A colour swatch + hex field. Clicking the swatch opens a popup of preset swatches with a "Custom..." button (QColorDialog). Emits colorChanged.
At a glance
| Tier | Free (GPLv3) |
| Import | from Custom_Widgets.QCustomColorPicker import QCustomColorPicker |
| Qt Designer | Yes — drag it from the palette |
Quick start
from Custom_Widgets.QCustomColorPicker import QCustomColorPicker
widget = QCustomColorPicker()
Dark theme
Colours come from the design tokens, so the widget follows the app theme with no extra work.
Signals
| Signal |
|---|
colorChanged(QColor) |
Methods
| Method | Description |
|---|---|
color() | Color. |
colorChanged(...) | Color changed. |
colorName() | Color name. |
setColor(color) | Set the color. |
Theming
Colours come from the design tokens, so they follow the active theme. Roles used: surface, on-surface, surface-muted, outline, accent.
See Design tokens.
Related
QCustomButtonGroup · QCustomCheckBox · QCustomComboBox · QCustomDateEdit · QCustomDateRangePicker · QCustomEmojiPicker · QCustomFileDropZone · QCustomForm