Class: QgsDevToolWidgetFactory

Factory class for creating custom developer/debugging tool pages

Added in version 3.14.

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.

class qgis.gui.QgsDevToolWidgetFactory[source]

Bases: object

__init__(title: str | None = '', icon: QIcon = QIcon())

Constructor for a QgsDevToolWidgetFactory with the specified title and icon.

Parameters:
  • title (Optional[str] = '')

  • icon (QIcon = QIcon())

__init__(a0: QgsDevToolWidgetFactory)
Parameters:

a0 (QgsDevToolWidgetFactory)

createWidget(self, parent: QWidget | None = None) QgsDevToolWidget | None[source]

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 (Optional[QWidget] = None)

Return type:

Optional[QgsDevToolWidget]

icon(self) QIcon[source]

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

See also

setIcon()

Return type:

QIcon

setIcon(self, icon: QIcon)[source]

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 | None)[source]

Set the translated title for the tool.

Parameters:

title (Optional[str])

title(self) str[source]

Returns the (translated) title of the tool.

See also

setTitle()

Return type:

str