Class: QgsLayoutItemGroup

class qgis.core.QgsLayoutItemGroup(layout: QgsLayout)

Bases: QgsLayoutItem

Constructor for QgsLayoutItemGroup, belonging to the specified layout.

A container for grouping several QgsLayoutItems.

New in version 3.0.

Parameters

layout

addItem(self, item: QgsLayoutItem)

Adds an item to the group. Ownership of the item is transferred to the group.

Parameters

item (QgsLayoutItem) –

adjustPointForReferencePosition()
applyDataDefinedSize()
applyItemSizeConstraint()
attemptMove(self, point: QgsLayoutPoint, useReferencePoint: bool = True, includesFrame: bool = False, page: int = -1)
Parameters
  • point (QgsLayoutPoint) –

  • useReferencePoint (bool = True) –

  • includesFrame (bool = False) –

  • page (int = -1) –

attemptResize(self, size: QgsLayoutSize, includesFrame: bool = False)
Parameters
childEvent()
cleanup(self)
connectNotify()
contextMenuEvent()
create(layout: QgsLayout) → QgsLayoutItemGroup

Returns a new group item for the specified layout.

The caller takes responsibility for deleting the returned object.

Parameters

layout (QgsLayout) –

Return type

QgsLayoutItemGroup

customEvent()
disconnectNotify()
displayName(self) → str
Return type

str

dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
draw(self, context: QgsLayoutItemRenderContext)
Parameters

context (QgsLayoutItemRenderContext) –

drawBackground()
drawDebugRect()
drawFrame()
dropEvent()
finalizeRestoreFromXml(self)
focusInEvent()
focusOutEvent()
hoverEnterEvent()
hoverLeaveEvent()
hoverMoveEvent()
inputMethodEvent()
inputMethodQuery()
isSignalConnected()
itemChange()
items(self) → List[QgsLayoutItem]

Returns a list of items contained by the group.

Return type

List[QgsLayoutItem]

keyPressEvent()
keyReleaseEvent()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
paint(self, painter: QPainter, itemStyle: QStyleOptionGraphicsItem, pWidget: QWidget)
Parameters
  • painter (QPainter) –

  • itemStyle (QStyleOptionGraphicsItem) –

  • pWidget (QWidget) –

positionAtReferencePoint()
prepareGeometryChange()
readObjectPropertiesFromElement()
readPropertiesFromElement(self, itemElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
Parameters
Return type

bool

receivers()
refreshBackgroundColor()
refreshBlendMode()
refreshFrame()
refreshItemPosition()
refreshItemRotation()
refreshItemSize()
refreshOpacity()
removeItems(self)

Removes all items from the group (but does not delete them). Items remain in the scene but are no longer grouped together

sceneEvent()
sceneEventFilter()
sender()
senderSignalIndex()
setFixedSize()
setMinimumSize()
setVisibility(self, visible: bool)
Parameters

visible (bool) –

timerEvent()
topLeftToReferencePoint()
type(self) → int
Return type

int

updateMicroFocus()
wheelEvent()
writeObjectPropertiesToElement()
writePropertiesToElement(self, parentElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool
Parameters
  • parentElement (QDomElement) –

  • document (QDomDocument) –

  • context (QgsReadWriteContext) –

Return type

bool