QCustomMediaGrid
QCustomMediaGrid ships in Custom Widgets Pro. The free package under GPLv3 does not include it.
A data-driven thumbnail gallery.
The "Media, Files & Links" photo grid: a responsive grid of rounded
thumbnails. Feed it images with setImages([...]) (QPixmap / path) or coloured
placeholders with setPlaceholders([(top,bottom), …]); it lays them out in
columns with rounded corners and emits tileClicked(index) so a manager
can open a viewer. Layout, corner radius and spacing are Designer
qproperties — the manager supplies DATA only, never builds tiles.
At a glance
| Tier | Pro |
| Import | from Custom_Widgets.QCustomMediaGrid import QCustomMediaGrid |
| Qt Designer | Yes — drag it from the palette |
Quick start
from Custom_Widgets.QCustomMediaGrid import QCustomMediaGrid
widget = QCustomMediaGrid()
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 |
|---|---|---|
columns | int | 3 |
spacing | int | 8 |
tileRadius | int | 12 |
tileHeight | int | 60 |
Signals
| Signal |
|---|
tileClicked(int) |
Methods
| Method | Description |
|---|---|
columns(*args, **kwargs) | Columns. |
count() | Count. |
pixmaps() | The current tile pixmaps (for feeding a lightbox / viewer). |
setImageAt(index, pm) | Swap one tile's pixmap in place (e.g. a real photo arriving async). |
setImages(images) | Set the images. |
setPlaceholders(pairs) | Set the placeholders. |
spacing(*args, **kwargs) | Spacing. |
tileClicked(...) | Tile clicked. |
tileHeight(*args, **kwargs) | Tile height. |
tileRadius(*args, **kwargs) | Tile radius. |
Related
QCustomCoverFlow · QCustomImageViewer · QCustomMediaTimeline · QCustomPlayerBar · QCustomVideoPlayer · QCustomVoiceMessage · QCustomWallpaper