Skip to main content

QCustomVoiceMessage

QCustomVoiceMessage

A voice / audio message with a scrubber waveform.

The audio row seen inside a chat bubble: a circular play / pause button, a painted bar waveform (heights from valuesCsv), and a duration label. The played portion of the waveform fills with the accent colour up to progress (0..1), the rest stays muted, so it doubles as a scrubber. Bars are painted (crisp at any size, no assets); every colour is a qproperty so it tracks the theme. Clicking the button toggles playing and emits playToggled(bool); clicking the waveform emits seeked(float).

At a glance​

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

Quick start​

from Custom_Widgets.QCustomVoiceMessage import QCustomVoiceMessage

widget = QCustomVoiceMessage()

Dark theme​

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

QCustomVoiceMessage in dark theme

Properties​

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

PropertyTypeDefault
valuesCsvstring3,6,10,14,9,16,20,12,7,18,22,14,8,12,6,10,16,9,5,12,18,10,6,14,8
durationstring01:30
progressfloat0.0
playingboolFalse
playedColorcolor#1b74e4
unplayedColorcolor#c7d0dc
buttonColorcolor#1b74e4
buttonIconColorcolor#ffffff
durationColorcolor#5a6478
buttonDiameterint34

Signals​

Signal
playToggled(bool)
seeked(double)

Methods​

MethodDescription
buttonColor(*args, **kwargs)Button color.
buttonDiameter(*args, **kwargs)Button diameter.
buttonIconColor(*args, **kwargs)Button icon color.
duration(*args, **kwargs)Duration.
durationColor(*args, **kwargs)Duration color.
playToggled(...)Play toggled.
playedColor(*args, **kwargs)Played color.
playing(*args, **kwargs)Playing.
progress(*args, **kwargs)Progress.
seeked(...)Seeked.
unplayedColor(*args, **kwargs)Unplayed color.
valuesCsv(*args, **kwargs)Values csv.

QCustomCoverFlow · QCustomImageViewer · QCustomMediaGrid · QCustomMediaTimeline · QCustomPlayerBar · QCustomVideoPlayer · QCustomWallpaper