Class: QgsLayoutComboBox

class qgis.gui.QgsLayoutComboBox(parent: QWidget = None, manager: QgsLayoutManager = None)

Bases: PyQt5.QtWidgets.QComboBox

QgsLayoutComboBox creates a combo box to display a list of items in a layout manager. The layouts can optionally be filtered by type.

The QgsLayoutComboBox class is a combo box which displays available layouts from a QgsLayoutManager.

New in version 3.8.

Parameters
  • parent (QWidget = None) –

  • manager

actionEvent()
allowEmptyLayout(self) → bool

Returns True if the combobox includes the empty layout (“not set”) choice.

Return type

bool

changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
currentLayout(self) → QgsMasterLayoutInterface

Returns the layout currently selected in the combo box.

Return type

QgsMasterLayoutInterface

customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
filters(self) → QgsLayoutManagerProxyModel.Filters

Returns the current filters used for filtering available layouts.

See also

setFilters()

Return type

QgsLayoutManagerProxyModel.Filters

focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
initStyleOption()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
layout(self, index: int) → QgsMasterLayoutInterface

Returns the layout at the specified index.

Parameters

index (int) –

Return type

QgsMasterLayoutInterface

layoutChanged

Emitted whenever the currently selected layout changes [signal]

Parameters

layout (QgsMasterLayoutInterface) –

leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setAllowEmptyLayout(self, allowEmpty: bool)

Sets whether an optional empty layout (“not set”) option is present in the combobox.

Parameters

allowEmpty (bool) –

setCurrentLayout(self, layout: QgsMasterLayoutInterface)

Sets the currently selected layout in the combo box.

Parameters

layout (QgsMasterLayoutInterface) –

setFilters(self, filters: Union[QgsLayoutManagerProxyModel.Filters, QgsLayoutManagerProxyModel.Filter])

Sets the current filters used for filtering available layouts.

See also

filters()

Parameters

filters (Union[QgsLayoutManagerProxyModel.Filters) –

setLayoutManager(self, manager: QgsLayoutManager)

Sets the layout manager containing the layouts to list in the combo box.

Parameters

manager (QgsLayoutManager) –

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()