Class: QgsLayoutItemTextTable¶
A text table item that reads text from string lists.
Class Hierarchy¶
Base classes¶
Displays a table in the print layout, and allows the table to span over multiple frames. |
|
Abstract base class for layout items with the ability to distribute the content to several frames ( |
|
A base class for objects which belong to a layout. |
|
Abstract interface for generating an expression context. |
|
Interface for layout objects which support undo/redo commands. |
Methods
Adds a row to the table |
|
Sets the contents of the text table. |
Static Methods
Returns a new |
- class qgis.core.QgsLayoutItemTextTable[source]¶
Bases:
QgsLayoutTable
- __init__(layout: QgsLayout | None)
Constructor for QgsLayoutItemTextTable, for the specified
layout
.Ownership is transferred to the layout.
- Parameters:
layout (Optional[QgsLayout])
- addRow(self, row: Iterable[str | None])[source]¶
Adds a row to the table
- Parameters:
row (Iterable[Optional[str]]) – list of strings to use for each cell’s value in the newly added row
Note
If row is shorter than the number of columns in the table than blank cells will be inserted at the end of the row. If row contains more strings then the number of columns in the table then these extra strings will be ignored.
Note
if adding many rows,
setContents()
is much faster
- static create(layout: QgsLayout | None) QgsLayoutItemTextTable | None [source]¶
Returns a new
QgsLayoutItemTextTable
for the specified parentlayout
.- Parameters:
layout (Optional[QgsLayout])
- Return type:
Optional[QgsLayoutItemTextTable]