Hi list -

I've been doodling a while using the QML widget i QGIS (version 3.42, Windows) : and I have a question: Is it possible to design a editing widget using the QML widget as a base?

And the why ? :

I have a postgres table, where one of the fields is a "jsonb" object. I can /show/ the json values using the "Json view" widget or even make the elements of the json object editable using the "key/value" widget (my json object are "flat": only a series of key/value pairs).

However, I would like to add a drop-down value list to some of the elements in the jsonb field, so the user can choose a value from a list instead of writing the value using a keyboard.

As far as i can see, i have couple of potential choices: Try to subclass the "key/value" widget if that's possible from python and extend the functionality.

Or design a QML document which shows the json element in a number of combo-boxes.

And hence the question: Can i replace the field value with the changed version from a QML widget. And how ??



--
Med venlig hilsen / Best regards

Bo Victor Thomsen
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to