Skip to main content

QCustomVideoPlayer

Pro widget

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

See plans

QCustomVideoPlayer

A poster-framed media/video player card.

A rounded poster image with a big centred play button and a bottom control bar (play / pause, elapsed / total time, a seek track). Feed it a poster with setPoster(pm) and a length with duration ("mm:ss"); pressing play advances a simulated playhead (a QTimer) so it demos without any media backend, and clicking the track seeks. It emits playToggled(bool) and seeked(float 0..1). Everything is painted (crisp at any size, no assets) and every colour is a qproperty so it tracks the theme.

At a glance

TierPro
Importfrom Custom_Widgets.QCustomVideoPlayer import QCustomVideoPlayer
Qt DesignerYes — drag it from the palette

Quick start

from Custom_Widgets.QCustomVideoPlayer import QCustomVideoPlayer

widget = QCustomVideoPlayer()

Dark theme

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

QCustomVideoPlayer in dark theme

Properties

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

PropertyTypeDefault
durationstring02:45
progressfloat0.0
playingboolFalse
radiusint18
accentColorcolor#1b74e4
posterColorcolor#222838
barColorcolor#e6ffffff
trackColorcolor#4dffffff
textColorcolor#ffffff

Signals

Signal
playToggled(bool)
seeked(double)

Methods

MethodDescription
accentColor(*args, **kwargs)Accent color.
barColor(*args, **kwargs)Bar color.
duration(*args, **kwargs)Duration.
playToggled(...)Play toggled.
playing(*args, **kwargs)Playing.
posterColor(*args, **kwargs)Poster color.
progress(*args, **kwargs)Progress.
radius(*args, **kwargs)Radius.
seeked(...)Seeked.
setPlaying(v)Set the playing.
setPoster(pm)Set the poster.
textColor(*args, **kwargs)Text color.
toggle()Toggle.
trackColor(*args, **kwargs)Track color.

Theming

Colours come from the design tokens, so they follow the active theme. Roles used: accent.

See Design tokens.

QCustomCoverFlow · QCustomImageViewer · QCustomMediaGrid · QCustomMediaTimeline · QCustomPlayerBar · QCustomVoiceMessage · QCustomWallpaper