Class: QgsUserInputWidget

A floating widget that can be used to display widgets for user inputs.

It can be used by map tools, plugins, etc. Several widgets can be displayed at once, they will be separated by a separator. Widgets will be either layout horizontally or vertically. The widget is automatically hidden if it contains no widget.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsUserInputWidget

Base classes

QgsFloatingWidget

A QWidget subclass for creating widgets which float outside of the normal Qt layout system.

QWidget

QObject

QPaintDevice

Methods

addUserInputWidget

Add a widget to be displayed in the dock.

class qgis.gui.QgsUserInputWidget[source]

Bases: QgsFloatingWidget

__init__(parent: QWidget | None = None)

Constructor for QgsUserInputWidget

Parameters:

parent (Optional[QWidget] = None)

addUserInputWidget(self, widget: QWidget | None)[source]

Add a widget to be displayed in the dock.

Parameters:

widget (Optional[QWidget]) – widget to add. Ownership is not transferred.