QgsTextFormatPanelWidget class

A panel widget for customizing text formatting settings.

QgsTextFormatPanelWidget provides a panel widget for controlling the appearance of text rendered using QgsTextRenderer. The dialog includes all settings contained within a QgsTextFormat, including shadow, background and buffer.

Base classes

class QgsPanelWidgetWrapper
Wrapper widget for existing widgets which can't have the inheritance tree changed, e.g dialogs.

Constructors, destructors, conversion operators

QgsTextFormatPanelWidget(const QgsTextFormat& format, QgsMapCanvas* mapCanvas = nullptr, QWidget* parent = nullptr)
Constructor for QgsTextFormatPanelWidget.

Public functions

auto format() const -> QgsTextFormat
Returns the current formatting settings defined by the widget.
void setDockMode(bool dockMode) override
Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.

Function documentation

QgsTextFormatPanelWidget::QgsTextFormatPanelWidget(const QgsTextFormat& format, QgsMapCanvas* mapCanvas = nullptr, QWidget* parent = nullptr)

Constructor for QgsTextFormatPanelWidget.

Parameters
format initial format settings to show in dialog
mapCanvas optional associated map canvas
parent parent widget

void QgsTextFormatPanelWidget::setDockMode(bool dockMode) override

Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs.

Parameters
dockMode True to enable dock mode.