Class: QgsLayoutItemManualTable¶
A layout table subclass that displays manually entered (and formatted) content.
Added in version 3.12.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: QgsLayoutTable.getTableContents()
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
Returns the list of column widths (in millimeters) to use when rendering the table. |
|
Returns a reference to the list of headers shown in the table |
|
Returns |
|
Returns the list of row heights (in millimeters) to use when rendering the table. |
|
Sets the list of column widths (in millimeters) to use when rendering the table. |
|
Replaces the headers in the table with a specified list of |
|
Sets whether the table includes a header row. |
|
Sets the list of row heights (in millimeters) to use when rendering the table. |
|
Sets the contents of the table. |
|
Returns the contents of the table. |
Static Methods
Returns a new |
- class qgis.core.QgsLayoutItemManualTable[source]¶
Bases:
QgsLayoutTable
- __init__(layout: QgsLayout | None)
Constructor for QgsLayoutItemManualTable, attached to the specified
layout
.Ownership is transferred to the layout.
- Parameters:
layout (Optional[QgsLayout])
- columnWidths(self) List[float] ¶
Returns the list of column widths (in millimeters) to use when rendering the table.
A width of 0 indicates that the column width should be automatically calculated.
See also
See also
- Return type:
List[float]
- static create(layout: QgsLayout | None) QgsLayoutItemManualTable | None [source]¶
Returns a new
QgsLayoutItemManualTable
for the specified parentlayout
.- Parameters:
layout (Optional[QgsLayout])
- Return type:
Optional[QgsLayoutItemManualTable]
- headers(self) List[QgsLayoutTableColumn] ¶
Returns a reference to the list of headers shown in the table
See also
- Return type:
List[QgsLayoutTableColumn]
- includeTableHeader(self) bool [source]¶
Returns
True
if the table includes a header row.See also
- Return type:
bool
- rowHeights(self) List[float] ¶
Returns the list of row heights (in millimeters) to use when rendering the table.
A height of 0 indicates that the row height should be automatically calculated.
See also
See also
- Return type:
List[float]
- setColumnWidths(self, widths: Iterable[float])[source]¶
Sets the list of column
widths
(in millimeters) to use when rendering the table.A width of 0 indicates that the column width should be automatically calculated.
See also
See also
- Parameters:
widths (Iterable[float])
- setHeaders(self, headers: Iterable[QgsLayoutTableColumn])[source]¶
Replaces the headers in the table with a specified list of
QgsLayoutTableColumns
.See also
- Parameters:
headers (Iterable[QgsLayoutTableColumn])
- setIncludeTableHeader(self, included: bool)[source]¶
Sets whether the table includes a header row.
See also
- Parameters:
included (bool)
- setRowHeights(self, heights: Iterable[float])[source]¶
Sets the list of row
heights
(in millimeters) to use when rendering the table.A height of 0 indicates that the row height should be automatically calculated.
See also
See also
- Parameters:
heights (Iterable[float])