Class: QgsReportSectionLayout

A report section consisting of a single QgsLayout body.

Warning

This is not considered stable API, and may change in future QGIS releases. It is exposed to the Python bindings for unit testing purposes only.

Class Hierarchy

Inheritance diagram of qgis.core.QgsReportSectionLayout

Base classes

QgsAbstractReportSection

An abstract base class for QgsReport subsections.

QgsAbstractLayoutIterator

An abstract base class for QgsLayout based classes which can be exported by QgsLayoutExporter.

Methods

body

Returns the body layout for the section.

bodyEnabled

Returns True if the body for the section is enabled.

setBody

Sets the body layout for the section.

setBodyEnabled

Sets whether the body for the section is enabled.

class qgis.core.QgsReportSectionLayout[source]

Bases: QgsAbstractReportSection

__init__(parentSection: QgsAbstractReportSection | None = None)

Constructor for QgsReportSectionLayout, attached to the specified parent section. Note that ownership is not transferred to parent.

Parameters:

parentSection (Optional[QgsAbstractReportSection] = None)

body(self) QgsLayout | None[source]

Returns the body layout for the section.

See also

setBody()

See also

bodyEnabled()

See also

setBodyEnabled()

Return type:

Optional[QgsLayout]

bodyEnabled(self) bool[source]

Returns True if the body for the section is enabled.

See also

setBodyEnabled()

See also

body()

See also

setBody()

Return type:

bool

setBody(self, body: QgsLayout | None)[source]

Sets the body layout for the section. Ownership of body is transferred to the report section.

See also

body()

See also

bodyEnabled()

See also

setBodyEnabled()

Parameters:

body (Optional[QgsLayout])

setBodyEnabled(self, enabled: bool)[source]

Sets whether the body for the section is enabled.

See also

bodyEnabled()

See also

body()

See also

setBody()

Parameters:

enabled (bool)