Class: QgsDevToolWidgetFactory

Factory class for creating custom developer/debugging tool pages.

Added in version 3.14.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: createWidget()

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)

abstract 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]

virtual 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])

virtual title(self) str[source]

Returns the (translated) title of the tool.

See also

setTitle()

Return type:

str