Skip to main content

QCustomMediaGrid

Pro widget

QCustomMediaGrid ships in Custom Widgets Pro. The free package under GPLv3 does not include it.

See plans

QCustomMediaGrid

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

TierPro
Importfrom Custom_Widgets.QCustomMediaGrid import QCustomMediaGrid
Qt DesignerYes — 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.

QCustomMediaGrid in dark theme

Properties

Every property below is settable in code and in Qt Designer.

PropertyTypeDefault
columnsint3
spacingint8
tileRadiusint12
tileHeightint60

Signals

Signal
tileClicked(int)

Methods

MethodDescription
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.

QCustomCoverFlow · QCustomImageViewer · QCustomMediaTimeline · QCustomPlayerBar · QCustomVideoPlayer · QCustomVoiceMessage · QCustomWallpaper