Skip to main content
table = table.multiFrame() ==> table = table_frame.multiFrame()
Source Link

You can use QgsComposerFrame.multiFrame():

table_frame = printcomposer['QgsComposition'].getComposerItemById('table')
table = tabletable_frame.multiFrame()

Multiframe items like tables and HTML items can have their contents spread over multiple "frames". The getComposerItemById method is returning a frame for a table, but not the table itself. Calling the multiFrame() method returns the frame's parent QgsComposerMultiFrame object, which in this case will be a QgsComposerAttributeTableV2.

You can use QgsComposerFrame.multiFrame():

table_frame = printcomposer['QgsComposition'].getComposerItemById('table')
table = table.multiFrame()

Multiframe items like tables and HTML items can have their contents spread over multiple "frames". The getComposerItemById method is returning a frame for a table, but not the table itself. Calling the multiFrame() method returns the frame's parent QgsComposerMultiFrame object, which in this case will be a QgsComposerAttributeTableV2.

You can use QgsComposerFrame.multiFrame():

table_frame = printcomposer['QgsComposition'].getComposerItemById('table')
table = table_frame.multiFrame()

Multiframe items like tables and HTML items can have their contents spread over multiple "frames". The getComposerItemById method is returning a frame for a table, but not the table itself. Calling the multiFrame() method returns the frame's parent QgsComposerMultiFrame object, which in this case will be a QgsComposerAttributeTableV2.

Source Link
ndawson
  • 27.8k
  • 3
  • 61
  • 85

You can use QgsComposerFrame.multiFrame():

table_frame = printcomposer['QgsComposition'].getComposerItemById('table')
table = table.multiFrame()

Multiframe items like tables and HTML items can have their contents spread over multiple "frames". The getComposerItemById method is returning a frame for a table, but not the table itself. Calling the multiFrame() method returns the frame's parent QgsComposerMultiFrame object, which in this case will be a QgsComposerAttributeTableV2.