Class: QgsBrowserWidget¶
A widget showing a browser tree view along with toolbar and toggleable properties pane.
Added in version 3.22.
Class Hierarchy¶
Base classes¶
Base class for any widget that can be shown as an inline panel. |
|
Methods
Returns the map canvas associated with the widget. |
|
Returns the message bar associated with the widget. |
|
Refreshes the browser model and view. |
|
Sets the customization for data items based on item's data provider key |
|
Sets a map canvas to use alongside the widget. |
|
Sets a message bar to use alongside the widget. |
- class qgis.gui.QgsBrowserWidget[source]¶
Bases:
QgsPanelWidget
- __init__(browserModel: QgsBrowserGuiModel | None, parent: QWidget | None = None)
Constructor for QgsBrowserWidget
- Parameters:
browserModel (Optional[QgsBrowserGuiModel]) – instance of the (shared) browser model
parent (Optional[QWidget] = None) – parent widget
- mapCanvas(self) QgsMapCanvas | None [source]¶
Returns the map canvas associated with the widget.
See also
Added in version 3.44.
- Return type:
Optional[QgsMapCanvas]
- messageBar(self) QgsMessageBar | None [source]¶
Returns the message bar associated with the widget.
See also
- Return type:
Optional[QgsMessageBar]
- setDisabledDataItemsKeys(self, filter: Iterable[str | None])[source]¶
Sets the customization for data items based on item’s data provider key
By default browser model shows all items from all available data items provider and few special items (e.g. Favorites). To customize the behavior, set the filter to not load certain data items. The items that are not based on data item providers (e.g. Favorites, Home) have prefix “special:”
Used in the proxy browser model to hide items
- Parameters:
filter (Iterable[Optional[str]])
- setMapCanvas(self, canvas: QgsMapCanvas | None)[source]¶
Sets a map
canvas
to use alongside the widget.Setting this allows items to utilize the canvas during GUI operations.
See also
Added in version 3.44.
- Parameters:
canvas (Optional[QgsMapCanvas])
- setMessageBar(self, bar: QgsMessageBar | None)[source]¶
Sets a message
bar
to use alongside the widget. Setting this allows items to utilize the message bar to provide non-blocking feedback to users, e.g. success or failure of actions.See also
- Parameters:
bar (Optional[QgsMessageBar])