Class: QgsLayoutFrame¶
Base class for frame items, which form a layout multiframe item.
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
Returns the visible portion of the multi frame's content which is shown in this frame, in layout units.  | 
|
Returns whether the background and frame stroke should be hidden if this frame is empty  | 
|
Returns whether the page should be hidden (ie, not included in layout exports) if this frame is empty  | 
|
Returns whether the frame is empty.  | 
|
Returns the parent multiframe for the frame.  | 
|
Sets the visible part of the multiframe's content which is visible within this frame (relative to the total multiframe extent in layout units).  | 
|
Sets whether the background and frame stroke should be hidden if this frame is empty  | 
|
Sets whether the page should be hidden (ie, not included in layout exports) if this frame is empty  | 
Static Methods
Creates a new   | 
- class qgis.core.QgsLayoutFrame[source]¶
 Bases:
QgsLayoutItem- __init__(layout: QgsLayout | None, multiFrame: QgsLayoutMultiFrame | None)
 Constructor for QgsLayoutFrame, with the specified parent
layoutand belonging to amultiFrame.- Parameters:
 layout (Optional[QgsLayout])
multiFrame (Optional[QgsLayoutMultiFrame])
- static create(layout: QgsLayout | None) QgsLayoutFrame | None[source]¶
 Creates a new
QgsLayoutFramebelonging to the specifiedlayout.- Parameters:
 layout (Optional[QgsLayout])
- Return type:
 Optional[QgsLayoutFrame]
- extent(self) QRectF[source]¶
 Returns the visible portion of the multi frame’s content which is shown in this frame, in layout units.
See also
- Return type:
 QRectF
- hideBackgroundIfEmpty(self) bool[source]¶
 Returns whether the background and frame stroke should be hidden if this frame is empty
- Return type:
 bool
- Returns:
 Trueif background and stroke should be hidden if frame is empty
See also
- hidePageIfEmpty(self) bool[source]¶
 Returns whether the page should be hidden (ie, not included in layout exports) if this frame is empty
- Return type:
 bool
- Returns:
 Trueif page should be hidden if frame is empty
See also
- multiFrame(self) QgsLayoutMultiFrame | None[source]¶
 Returns the parent multiframe for the frame.
- Return type:
 Optional[QgsLayoutMultiFrame]
- setContentSection(self, section: QRectF)[source]¶
 Sets the visible part of the multiframe’s content which is visible within this frame (relative to the total multiframe extent in layout units).
See also
- Parameters:
 section (QRectF)
- setHideBackgroundIfEmpty(self, hideBackgroundIfEmpty: bool)[source]¶
 Sets whether the background and frame stroke should be hidden if this frame is empty
- Parameters:
 hideBackgroundIfEmpty (bool) – set to
Trueif background and stroke should be hidden if frame is empty
See also