Skip to main content

QCustomCoverFlow

QCustomCoverFlow

A 3D COVER-FLOW carousel.

The signature music/media hero: the ACTIVE cover sits large and centred with a bottom scrim, TITLE + ARTIST and a circular PLAY badge; its neighbours PEEK out on either side, progressively SCALED DOWN, DIMMED and slid behind it to fake depth. Click a side cover (or drag / wheel / arrow keys) to rotate it to the centre — the motion EASES smoothly. Fully painted with QPainter so it is crisp at any size and needs no images to preview (covers with no coverPath fall back to a per-item accent gradient).

Data-driven: feed it items with setItems([...]) (each: title, artist, coverPath, accent) or the itemsJson Designer property. Emits currentChanged(int), itemClicked(int) and playClicked(int).

At a glance​

TierFree (GPLv3)
Importfrom Custom_Widgets.QCustomCoverFlow import QCustomCoverFlow
Qt DesignerYes — drag it from the palette

Quick start​

from Custom_Widgets.QCustomCoverFlow import QCustomCoverFlow

widget = QCustomCoverFlow()

Dark theme​

Colours come from the design tokens, so the widget follows the app theme with no extra work.

QCustomCoverFlow in dark theme

Properties​

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

PropertyTypeDefault
itemsJsonstring[]
currentIndexint0
activeRatiofloat0.9
aspectfloat1.05
sideScalefloat0.72
sideOpacityfloat0.55
sideSpacingfloat0.42
cornerRadiusint24
showTextboolTrue
showPlayboolTrue
titleColorcolor#ffffff
artistColorcolor#c8c8d4
playColorcolor#ffffff

Signals​

Signal
currentChanged(int)
itemClicked(int)
playClicked(int)

Methods​

MethodDescription
activeRatio(*args, **kwargs)Active ratio.
artistColor(*args, **kwargs)Artist color.
aspect(*args, **kwargs)Aspect.
cornerRadius(*args, **kwargs)Corner radius.
count()Count.
currentChanged(...)Current changed.
currentIndex(*args, **kwargs)Current index.
itemClicked(...)Item clicked.
itemsJson(*args, **kwargs)Items json.
next()Next.
playClicked(...)Play clicked.
playColor(*args, **kwargs)Play color.
previous()Previous.
setCurrentIndex(i, animate=True)Set the current index.
setItems(items)Set the items.
showPlay(*args, **kwargs)Show the play.
showText(*args, **kwargs)Show the text.
sideOpacity(*args, **kwargs)Side opacity.
sideScale(*args, **kwargs)Side scale.
sideSpacing(*args, **kwargs)Side spacing.
titleColor(*args, **kwargs)Title color.

QCustomImageViewer · QCustomMediaGrid · QCustomMediaTimeline · QCustomPlayerBar · QCustomVideoPlayer · QCustomVoiceMessage · QCustomWallpaper