Skip to main content

QCustomMediaGrid

Pro widget

QCustomMediaGrid ships in Custom Widgets Pro. It is not part of the free GPLv3 package from 2.6.0 onward — the free package keeps the import path so Qt Designer forms still load, and installing Pro activates the widget with no code change. Releases up to 2.5.0 included it under the GPLv3.

Pro is licensed software and is not installable from PyPI — the name there is a pointer package with no widgets in it. Licence holders download the wheel from their account:

# https://portal.customwidgets.org/downloads
pip install <the downloaded .whl>

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