2

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?

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Pavel Pereverzev
  • 1,754
  • 12
  • 26

0 Answers0