ChatBubbleDelegate

Delegate that paints chat bubble chrome and provides persistent editors for complex content.

Declared in src/libs/libwidgets/widgets/chat/ChatBubbleDelegate.hpp
Inherits QStyledItemDelegate
Group libwidgets

Detailed description

Handles two rendering paths:

  • Painted — simple content (plain text, markdown, images) is drawn directly by paint() using QTextDocument.
  • Persistent editor — complex content (code blocks, task plan cards, error action buttons) gets a composite QWidget returned by createEditor().

Bubble chrome (background, border, role label, timestamp) is always painted by the delegate regardless of which content path is used.

See also ChatStreamWidget, ChatMessageModel.

In this section