You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since QField 3.3, it's possible to define an item threshold for value maps so that if the number of items is below the threshold, a toggle button interface is used (see #2193). This feature works flawlessly for value maps !
Request
It would be great if the same threshold behavior could be applied to the value relation widget, automatically converting it to a toggle button interface when the filtered set of items is small.
Use Case
In my project, I manage multiple tree species. A plugin allows me to select specific species, setting a selected boolean field on the corresponding layer. The value relation widget then applies a filter ("selected" = True), showing only the selected species in the dropdown list. However, even when the number of selected species falls below the threshold, the widget does not switch to the toggle button interface.
Although this scenario might be somewhat niche, I believe that extending the threshold feature to value relation widgets would enhance the QField UI for other users.
Additional Note
I also attempted to modify the ValueMap configuration directly from a plugin, but I encountered a limitation: the setEditorWidgetSetup method is not Q_INVOKABLE.
Thank you for considering this enhancement!
The text was updated successfully, but these errors were encountered:
Background
Since QField 3.3, it's possible to define an item threshold for value maps so that if the number of items is below the threshold, a toggle button interface is used (see #2193). This feature works flawlessly for value maps !
Request
It would be great if the same threshold behavior could be applied to the value relation widget, automatically converting it to a toggle button interface when the filtered set of items is small.
Use Case
In my project, I manage multiple tree species. A plugin allows me to select specific species, setting a
selected
boolean field on the corresponding layer. The value relation widget then applies a filter ("selected" = True
), showing only the selected species in the dropdown list. However, even when the number of selected species falls below the threshold, the widget does not switch to the toggle button interface.Although this scenario might be somewhat niche, I believe that extending the threshold feature to value relation widgets would enhance the QField UI for other users.
Additional Note
I also attempted to modify the ValueMap configuration directly from a plugin, but I encountered a limitation: the setEditorWidgetSetup method is not Q_INVOKABLE.
Thank you for considering this enhancement!
The text was updated successfully, but these errors were encountered: