Skip to main content

QCustomClockLabel

QCustomClockLabel

A self-ticking clock label.

Shows the current time in format (QTime.toString syntax, default "h:mm AP") and re-renders itself every interval ms - no app-side QTimer or formatting code. running (default True) pauses the tick; style it like any QLabel from QSS.

At a glance

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

Quick start

from Custom_Widgets.QCustomClockLabel import QCustomClockLabel

widget = QCustomClockLabel()

Dark theme

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

QCustomClockLabel in dark theme

Properties

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

PropertyTypeDefault
frameShapeQFrame::Shape
frameShadowQFrame::Shadow
lineWidthint
midLineWidthint
frameWidthint
frameRectQRect
textstring
textFormatQt::TextFormat
pixmapQPixmap
scaledContentsbool
alignmentQFlags<Qt::AlignmentFlag>
wordWrapbool
marginint
indentint
openExternalLinksbool
textInteractionFlagsQFlags<Qt::TextInteractionFlag>
hasSelectedTextbool
selectedTextstring
formatstringh:mm AP
intervalint1000
runningboolTrue

Methods

MethodDescription
format(*args, **kwargs)Format.
interval(*args, **kwargs)Interval.
running(*args, **kwargs)Running.

AnalogGaugeWidget · QCustomAgendaList · QCustomAlert · QCustomAvatar · QCustomAvatarGroup · QCustomBadge · QCustomCard · QCustomChip