QCustomPageDots
A carousel / pager page indicator.
A row (or column) of dots where the active page is drawn as an elongated
pill. Painted with QPainter so it stays crisp at any size and needs no child
widgets. Optionally clickable: clicking a dot sets it active and emits
pageChanged(index), so it can drive a QStackedWidget / carousel directly.
At a glance
| Tier | Free (GPLv3) |
| Import | from Custom_Widgets.QCustomPageDots import QCustomPageDots |
| Qt Designer | Yes — drag it from the palette |
Quick start
from Custom_Widgets.QCustomPageDots import QCustomPageDots
widget = QCustomPageDots()
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 |
|---|---|---|
count | int | 3 |
activeIndex | int | 0 |
dotColor | color | #d7dbe6 |
activeColor | color | #3355e8 |
dotDiameter | int | 8 |
activePillLength | int | 22 |
spacing | int | 6 |
orientation | enum: horizontal/vertical`` | horizontal |
clickable | bool | True |
Signals
| Signal |
|---|
pageChanged(int) |
Methods
| Method | Description |
|---|---|
activeColor(*args, **kwargs) | Active color. |
activeIndex(*args, **kwargs) | Active index. |
activePillLength(*args, **kwargs) | Active pill length. |
bindTo(control) | Two-way bind the dots to any paged control (QCustomSegmentedControl, |
clickable(*args, **kwargs) | Clickable. |
count(*args, **kwargs) | Count. |
dotColor(*args, **kwargs) | Dot color. |
dotDiameter(*args, **kwargs) | Dot diameter. |
orientation(*args, **kwargs) | Orientation. |
pageChanged(...) | Page changed. |
setActiveIndex(i) | Set the active index. |
setColors(dot=None, active=None) | Set the colors. |
setCount(n) | Set the count. |
spacing(*args, **kwargs) | Spacing. |
Theming
Colours come from the design tokens, so they follow the active theme. Roles used: accent.
See Design tokens.
Related
AnalogGaugeWidget · QCustomAgendaList · QCustomAlert · QCustomAvatar · QCustomAvatarGroup · QCustomBadge · QCustomCard · QCustomChip