Class: QgsLayoutItemGroup¶
A container for grouping several QgsLayoutItems
.
Class Hierarchy¶
Base classes¶
Base class for graphical items within a |
|
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
Adds an item to the group. |
|
Returns a list of items contained by the group. |
|
Removes all items from the group (but does not delete them). |
Static Methods
Returns a new group item for the specified layout. |
- class qgis.core.QgsLayoutItemGroup[source]¶
Bases:
QgsLayoutItem
- __init__(layout: QgsLayout | None)
Constructor for QgsLayoutItemGroup, belonging to the specified
layout
.- Parameters:
layout (Optional[QgsLayout])
- addItem(self, item: QgsLayoutItem | None)[source]¶
Adds an
item
to the group. Ownership of the item is transferred to the group.- Parameters:
item (Optional[QgsLayoutItem])
- static create(layout: QgsLayout | None) QgsLayoutItemGroup | None [source]¶
Returns a new group item for the specified
layout
.The caller takes responsibility for deleting the returned object.
- Parameters:
layout (Optional[QgsLayout])
- Return type:
Optional[QgsLayoutItemGroup]
- items(self) List[QgsLayoutItem] ¶
Returns a list of items contained by the group.
- Return type:
List[QgsLayoutItem]