Skip to main content

QCustomWaveform

QCustomWaveform

A standalone audio-bars / streaming-line visualiser.

Two modes (mode): "bars" (default) - an equalizer / audio-level bar viz (the "Water" card): one rounded bar per value, optional centre mirror (grows up + down), gradient + optional glow. "line" - a streaming line viz (the "110 bpm" ECG card): a polyline over an optional faint grid, with an optional gradient fill under it.

Feed it a fixed series with setValues([...]) / the valuesCsv property, or stream live with push(value) (a ring buffer of capacity samples scrolls). Turn on animated for a self-running demo (audio levels / a heartbeat), so it previews live in Designer / a demo without a data source.

Painted with QPainter; it FLEXes to the widget and all colours are qproperties so they flip with the theme. Unlike QCustomVoiceMessage this is NOT chat-bound.

At a glance​

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

Quick start​

from Custom_Widgets.QCustomWaveform import QCustomWaveform

widget = QCustomWaveform()

Dark theme​

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

QCustomWaveform in dark theme

Properties​

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

PropertyTypeDefault
modeenum: bars/line``bars
valuesCsvstring—
capacityint48
barColorcolor#3aa0ff
barColor2color#7c5cff
barWidthfloat0.0
barGapfloat3.0
cornerRadiusint3
mirrorboolFalse
lineColorcolor#ff5c6c
lineWidthfloat2.2
showGridboolFalse
gridColorcolor#242a38
fillAreaboolFalse
glowboolFalse
glowStrengthfloat0.6
animatedboolFalse

Signals​

Signal
valuePushed(double)

Methods​

MethodDescription
animated(*args, **kwargs)Animated.
barColor(*args, **kwargs)Bar color.
barColor2(*args, **kwargs)Bar color2.
barGap(*args, **kwargs)Bar gap.
barWidth(*args, **kwargs)Bar width.
capacity(*args, **kwargs)Capacity.
clear()Clear.
cornerRadius(*args, **kwargs)Corner radius.
fillArea(*args, **kwargs)Fill area.
glow(*args, **kwargs)Glow.
glowStrength(*args, **kwargs)Glow strength.
gridColor(*args, **kwargs)Grid color.
lineColor(*args, **kwargs)Line color.
lineWidth(*args, **kwargs)Line width.
mirror(*args, **kwargs)Mirror.
mode(*args, **kwargs)Mode.
push(value)Push.
setAnimated(on)Set the animated.
setMode(mode)Set the mode.
setValues(values)Set the values.
showGrid(*args, **kwargs)Show the grid.
valuePushed(...)Value pushed.
values()Values.
valuesCsv(*args, **kwargs)Values csv.

QCustomAreaChart · QCustomBarChart · QCustomBeeswarm · QCustomBubbleChart · QCustomCandlestickChart · QCustomCompass · QCustomCompassDial · QCustomDivergingBarChart