QCustomDrawer
A slide-in side panel / sheet.
A dimmed overlay with a panel that slides in from an edge (left / right / top / bottom). Backdrop-click or Esc closes it. Tokenized.
drawer = QCustomDrawer(window, side="left", size=280) drawer.contentLayout().addWidget(nav) drawer.open()
At a glance
| Tier | Free (GPLv3) |
| Import | from Custom_Widgets.QCustomDrawer import QCustomDrawer |
| Qt Designer | Yes — drag it from the palette |
Quick start
from Custom_Widgets.QCustomDrawer import QCustomDrawer
widget = QCustomDrawer()
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 |
|---|---|---|
side | enum: left/right/top/bottom`` | left |
drawerSize | int | — |
Signals
| Signal |
|---|
closed() |
opened() |
Methods
| Method | Description |
|---|---|
addWidget(widget) | Add a widget. |
close() | Close. |
closed(...) | Closed. |
contentLayout() | Content layout. |
drawerSize(*args, **kwargs) | Drawer size. |
isOpen() | Return whether the widget is open. |
open() | Open. |
opened(...) | Opened. |
side(*args, **kwargs) | Side. |
Theming
Colours come from the design tokens, so they follow the active theme. Roles used: surface, on-surface, outline.
See Design tokens.
Related
QCustomBreadcrumbs · QCustomCommandPalette · QCustomHamburgerMenu · QCustomHeaderNav · QCustomMenu · QCustomPagination · QCustomSidebar · QCustomSidebarButton