Skip to content

Conversation

@jarofgreen
Copy link
Collaborator

No description provided.

@jarofgreen
Copy link
Collaborator Author

Many issues have come up with the many-to-many widget QGIS provides (and also we wanted a simpler UI here), and we looked into replacing it with a custom widget.

This branch represents the furthest I got with working on this. It contains much code from CoPilot.

It created a ofdsqgisplugin/widget_multiple_codelist.py file which looks hopefull, and on reading seems to have the various operations of selecting a current item or adding a new item (we can remove the deleting items stuff tho as we don't need this).

Where I ran into problems was then hooking this into QGIS. CoPilot at first tried to attach it to a existing field on the primary layer - but for a many to many link there is no field on the primary layer. After much re-prompting it started supplying code it said would set up a custom relation widget but it didn't work.

The problem is

relation_editor = QgsAttributeEditorElement.create(...)

This returns None with no error message and I couldn't work out why. I did find something suggesting that the tag and type for the dom variable where important, but I tried a whole range (you can see this in the PR) and nothing worked.

At this point I ran out of time to finish this.

@jarofgreen jarofgreen marked this pull request as draft December 16, 2025 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants