Skip to main content

QCustomRichTextEditor

Pro widget

QCustomRichTextEditor ships in Custom Widgets Pro. The free package under GPLv3 does not include it.

See plans

QCustomRichTextEditor

A WYSIWYG rich-text editor.

A formatting toolbar (bold / italic / underline / headings / lists / alignment / text colour / clear) over a QTextEdit. Tokenized. Exposes toHtml / setHtml / toPlainText / setPlainText and a textChanged signal.

At a glance

TierPro
Importfrom Custom_Widgets.QCustomRichTextEditor import QCustomRichTextEditor
Qt DesignerYes — drag it from the palette

Quick start

from Custom_Widgets.QCustomRichTextEditor import QCustomRichTextEditor

widget = QCustomRichTextEditor()

Dark theme

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

QCustomRichTextEditor in dark theme

Signals

Signal
textChanged()

Methods

MethodDescription
editor()Editor.
setHtml(html)Set the html.
setPlainText(text)Set the plain text.
textChanged(...)Text changed.
toHtml()To html.
toPlainText()To plain text.

Theming

Colours come from the design tokens, so they follow the active theme. Roles used: surface, on-surface, surface-muted, outline, accent, on-primary.

See Design tokens.

QCustomCodeEditor · QCustomDataTable · QCustomNodeGraph · QCustomTableToolbar · QCustomTreeWidget