<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi list - <br>
</p>
<p>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? <br>
</p>
<p>And the why ? : </p>
<p>I have a postgres table, where one of the fields is a "jsonb"
object. I can <i>show</i> 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). </p>
<p>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.<br>
</p>
<p>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. </p>
<p>Or design a QML document which shows the json element in a number
of combo-boxes.</p>
<p>And hence the question: Can i replace the field value with the
changed version from a QML widget. And how ?? <br>
</p>
<p><br>
</p>
<p> <br>
</p>
<pre class="moz-signature" cols="72">--
Med venlig hilsen / Best regards
Bo Victor Thomsen</pre>
</body>
</html>