I need to create a table based on a Python list and paste it in layout view in QGIS.
I also found a QgsLayoutTable
class in PyQGIS but there's no example of creating a simple table.
If I had these objects:
layout = QgsProject.layoutManager().layouts()[0]
table_data = [
["a", "b"],
[1, 2,
]
How could I create a QGIS layout table like
a | b |
---|---|
1 | 2 |
and add it to the layout?