Class: QgsProviderSourceWidget

Base class for widgets which allow customization of a provider’s source URI.

Added in version 3.18.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsProviderSourceWidget

Base classes

QWidget

QObject

QPaintDevice

Methods

groupTitle

Returns an optional group title for the source settings, for use in layer properties dialogs.

mapCanvas

Returns the map canvas associated with the widget.

setMapCanvas

Sets a map canvas associated with the widget.

setSourceUri

Sets the source uri to show in the widget.

sourceUri

Returns the source URI as currently defined by the widget.

Signals

changed

Emitted whenever the configuration of the widget changes.

validChanged

Emitted whenever the validation status of the widget changes.

class qgis.gui.QgsProviderSourceWidget[source]

Bases: QWidget

__init__(parent: QWidget | None = None)

Constructor for QgsProviderSourceWidget with the specified parent widget.

Parameters:

parent (Optional[QWidget] = None)

signal changed[source]

Emitted whenever the configuration of the widget changes.

Added in version 3.30.

groupTitle(self) str[source]

Returns an optional group title for the source settings, for use in layer properties dialogs.

If not specified, a default title will be used.

Added in version 3.36.

Return type:

str

mapCanvas(self) QgsMapCanvas | None[source]

Returns the map canvas associated with the widget.

Added in version 3.26.

Return type:

Optional[QgsMapCanvas]

setMapCanvas(self, mapCanvas: QgsMapCanvas | None)[source]

Sets a map canvas associated with the widget.

Added in version 3.26.

Parameters:

mapCanvas (Optional[QgsMapCanvas])

setSourceUri(self, uri: str | None)[source]

Sets the source uri to show in the widget.

See also

sourceUri()

Parameters:

uri (Optional[str])

sourceUri(self) str[source]

Returns the source URI as currently defined by the widget.

See also

setSourceUri()

Return type:

str

signal validChanged(isValid: bool)[source]

Emitted whenever the validation status of the widget changes.

If isValid is False then the widget is not valid, and any dialog using the widget should be prevented from being accepted.

Parameters:

isValid (bool)