Class: QgsDevToolWidgetFactory

class qgis.gui.QgsDevToolWidgetFactory(title: str = '', icon: QIcon = QIcon())

Bases: sip.wrapper

Constructor for a QgsDevToolWidgetFactory with the specified title and icon.

QgsDevToolWidgetFactory(QgsDevToolWidgetFactory)

Factory class for creating custom developer/debugging tool pages

New in version 3.14.

Parameters
  • title (str = '') –

  • icon

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