Class: QgsDevToolWidgetFactory

class qgis.gui.QgsDevToolWidgetFactory

Bases: sip.wrapper

Factory class for creating custom developer/debugging tool pages

New in version 3.14.

QgsDevToolWidgetFactory(title: str = ‘’, icon: QIcon = QIcon()) Constructor for a QgsDevToolWidgetFactory with the specified title and icon.

QgsDevToolWidgetFactory(QgsDevToolWidgetFactory)

Methods

createWidget

Factory function to create the widget on demand as needed by the dock.

icon

Returns the icon that will be shown in the tool in the panel.

setIcon

Sets the icon for the factory object, which will be shown for the tool in the panel.

setTitle

Set the translated title for the tool.

title

Returns the (translated) title of the tool.

createWidget(self, parent: QWidget = None)QgsDevToolWidget

Factory function to create the widget on demand as needed by the dock.

The parent argument gives the correct parent for the newly created widget.

Parameters

parent (QWidget = None) –

Return type

QgsDevToolWidget

icon(self)QIcon

Returns the icon that will be shown in the tool in the panel.

See also

setIcon()

Return type

QIcon

setIcon(self, icon: QIcon)

Sets the icon for the factory object, which will be shown for the tool in the panel.

See also

icon()

Parameters

icon (QIcon) –

setTitle(self, title: str)

Set the translated title for the tool.

Parameters

title (str) –

title(self)str

Returns the (translated) title of the tool.

See also

setTitle()

Return type

str