Support multiple relation editors via relation widget registry (Request in QGIS) #6435
Open
2 of 3 tasks
Labels
Milestone
Request for documentation
From pull request qgis/QGIS#40721
Author: @suricactus
QGIS version: 3.18
Support multiple relation editors via relation widget registry
PR Description:
Description
With this change the current relation editor is no longer the only way to edit relations. Similarly to the way different field editors exist, one can develop and register their own widget, using the newly added classes:
QgsRelationWidget
- the widget used in the attribute formQgsRelationConfigWidget
- the configuration widget shown in layer's attribute table configuration tabQgsRelationWidgetFactory
- a factory that creates theQgsRelationWidget
andQgsRelationConfigWidget
QgsRelationWidgetRegistry
- a registry where the factory is being registered.The currently existing
QgsRelationEditorWidget
is deprecated and replaced withQgsBasicRelationEditorWidget
, which is protected from accidentally being deleted and is used as fallback widget.The most notable UI change allows the user to select the desired relation widget from the drag n drop form configuration:
![image](https://user-images.githubusercontent.com/2820439/102889463-5e54d100-4463-11eb-9319-b9b0c33b0d9f.png)
Note the widget type and widget configuration UI.
Sample widget:
These changes are part of qgis/QGIS-Enhancement-Proposals#79 .
TODOs:
Commits tagged with [need-docs] or [FEATURE]
The text was updated successfully, but these errors were encountered: