Skip to main content

QCustomChatDivider

QCustomChatDivider

A thread separator with a centered label.

The "YESTERDAY" / "Today" date pill (and the coloured "Unread messages" marker) that separates runs of chat bubbles. Three variants: pill (a rounded chip centred on transparent space), line (label between two hair rules), and unread (an accent rule + label). Painted-free (a QLabel + a painted rule), themeable via qproperties, Designer-droppable so the thread is composed in the form.

At a glance​

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

Quick start​

from Custom_Widgets.QCustomChatDivider import QCustomChatDivider

widget = QCustomChatDivider()

Dark theme​

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

QCustomChatDivider in dark theme

Properties​

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

PropertyTypeDefault
frameShapeQFrame::Shape—
frameShadowQFrame::Shadow—
lineWidthint—
midLineWidthint—
frameWidthint—
frameRectQRect—
textstringYESTERDAY
variantenum: pill/line/unread``pill
pillColorcolor#eef1f5
textColorcolor#8a93a6
lineColorcolor#e6e9ef
accentColorcolor#1b74e4

Methods​

MethodDescription
accentColor(*args, **kwargs)Accent color.
lineColor(*args, **kwargs)Line color.
pillColor(*args, **kwargs)Pill color.
text(*args, **kwargs)Text.
textColor(*args, **kwargs)Text color.
variant(*args, **kwargs)Variant.

QCustomChatBubble · QCustomChatInput · QCustomChatList · QCustomChatListItem · QCustomChatThread · QCustomMessageStatus · QCustomReactionBar · QCustomTypingIndicator