QCustomRating
A clickable star rating.
A row of stars; click to set the value, hover to preview. Read-only mode
for display. Tokenized via a filled dynamic property on each star.
At a glance
| Tier | Free (GPLv3) |
| Import | from Custom_Widgets.QCustomRating import QCustomRating |
| Qt Designer | Yes — drag it from the palette |
Quick start
from Custom_Widgets.QCustomRating import QCustomRating
widget = QCustomRating()
Dark theme
Colours come from the design tokens, so the widget follows the app theme with no extra work.
Properties
Every property below is settable in code and in Qt Designer.
| Property | Type | Default |
|---|---|---|
maximum | int | 5 |
value | int | 0 |
readOnly | bool | False |
Signals
| Signal |
|---|
valueChanged(int) |
Methods
| Method | Description |
|---|---|
maximum(*args, **kwargs) | Maximum. |
readOnly(*args, **kwargs) | Read only. |
setValue(v) | Set the value. |
value(*args, **kwargs) | Value. |
valueChanged(...) | Value changed. |
Theming
Colours come from the design tokens, so they follow the active theme. Roles used: warning, outline.
See Design tokens.
Related
QCustomButtonGroup · QCustomCheckBox · QCustomColorPicker · QCustomComboBox · QCustomDateEdit · QCustomDateRangePicker · QCustomEmojiPicker · QCustomFileDropZone