Class: QgsLayoutItemTextTable¶
-
class
qgis.core.
QgsLayoutItemTextTable
(layout: QgsLayout)¶ Bases:
QgsLayoutTable
Constructor for
QgsLayoutItemTextTable
, for the specifiedlayout
.Ownership is transferred to the layout.
A text table item that reads text from string lists
New in version 3.0.
- Parameters
layout –
-
addRow
(self, row: Iterable[str])¶ Adds a row to the table
- Parameters
row (Iterable[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
-
calculateMaxColumnWidths
()¶
-
calculateMaxRowHeights
()¶
-
childEvent
()¶
-
connectNotify
()¶
-
contentsContainsRow
()¶
-
create
(layout: QgsLayout) → QgsLayoutItemTextTable¶ Returns a new
QgsLayoutItemTextTable
for the specified parentlayout
.- Parameters
layout (QgsLayout) –
- Return type
-
customEvent
()¶
-
disconnectNotify
()¶
-
displayName
(self) → str¶ - Return type
str
-
drawHorizontalGridLines
()¶
-
getTableContents
(self, contents: object) → bool¶ - Parameters
contents (object) –
- Return type
bool
-
isSignalConnected
()¶
-
readObjectPropertiesFromElement
()¶
-
recalculateTableSize
()¶
-
receivers
()¶
-
rowRange
()¶
-
rowsVisible
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setContents
(self, contents: object)¶ Sets the contents of the text table.
- Parameters
contents (object) – list of table rows
See also
-
timerEvent
()¶
-
totalHeight
()¶
-
totalWidth
()¶
-
type
(self) → int¶ - Return type
int
-
writeObjectPropertiesToElement
()¶