[QGIS-Developer] Using QML widget as editing widget
Bo Victor Thomsen
bo.victor.thomsen at gmail.com
Sat Jun 7 07:09:19 PDT 2025
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250607/399bae19/attachment.htm>
More information about the QGIS-Developer
mailing list