<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Jörg,</p>
    <p>The easiest way is to set it up manually and inspect what the API
      returns.</p>
    <p>>>> iface.activeLayer().editorWidgetSetup(1).type()<br>
      'ValueRelation'<br>
      >>> iface.activeLayer().editorWidgetSetup(1).config()<br>
      {'AllowMulti': False, 'AllowNull': False, 'FilterExpression': '',
      'Key': 'fid', 'Layer':
      'countries_9ed4f4a4_f300_4bd3_a496_4b5fab68fc01', 'LayerName':
      'countries', 'LayerProviderName': 'ogr', 'LayerSource':
      'countries.gpkg', 'NofColumns': 1, 'OrderByValue': False,
      'UseCompleter': False, 'Value': 'test'}<br>
      <br>
      >>> iface.activeLayer().setEditorWidgetSetup(1,
      QgsEditorWidgetSetup('TextEdit', {} ))</p>
    <p>Hope that helps</p>
    <p>BR</p>
    <p>Matthias<br>
    </p>
    <div class="moz-cite-prefix">On 7/26/19 10:45 AM, Prof. Dr. Jörg
      Höttges wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:82c2ff05-c34d-10ac-bc1f-bc83c3ce5693@fh-aachen.de">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <p>Hi all, <br>
      </p>
      <p>in a QGIS3 plugin I need to modify the editwidget from
        "TextEdit" to e. g. "ValueRelation". How can I find out the
        Widgetname that I need for
        editFormConfig.widgetConfig(widgetname)? Or is this the wrong
        way to do it?<br>
      </p>
      <p>Thanks in advance<br>
      </p>
      <div class="moz-signature">Jörg</div>
      <div class="moz-signature"><br>
      </div>
      <div class="moz-signature"> <br>
        <table
          style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:80%">
          <tbody>
            <tr>
              <td style="vertical-align:top" width="50"><img
                  src="cid:part1.84DCDCD3.32A74C68@opengis.ch" alt="FH
                  Aachen" class="" width="38" height="128"></td>
              <td width="500">
                <div class="vcard">
                  <div style="font-weight:bold" class="fn n"> <span
                      class="title" style="">Prof. Dr.-Ing.</span> <span
                      class="given-name" style="">Jörg</span> <span
                      class="family-name" style="">Höttges</span> </div>
                  <div>Fachbereich 2 - Bauingenieurwesen</div>
                  Wasserwirtschaft und Bauinformatik<br>
                  Raum 02315<br>
                  <div class="org" style="margin-top:1em">FH Aachen<br>
                    University of Applied Sciences</div>
                  <div class="adr">
                    <!-- <span class="type" style="display:none">work</span> -->
                    <div class="street-address">Bayernallee 9</div>
                    <div> <span class="postal-code"
                        style="display:inline;margin-right:0.2em">52066</span>
                      <span class="locality" style="display:inline">Aachen</span>
                      | <span class="country-name"
                        style="display:inline;">Germany</span> </div>
                  </div>
                  <div class="tel" style="margin-top:1em"> T <span
                      class="value">+49 (0)241 6009-51176</span> </div>
                  <div class="tel"> F <span class="value">+49 (0)241
                      6009-51206</span> </div>
                  <a class="url" style="color:#00b5ad"
                    href="http://www.fh-aachen.de/hoettges/"
                    moz-do-not-send="true">http://www.fh-aachen.de/hoettges/</a><br>
                  <a class="email" style="display:block;color:#00b5ad"
                    href="mailto:hoettges@fh-aachen.de"
                    moz-do-not-send="true">hoettges@fh-aachen.de</a> </div>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-Developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-developer">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
    </blockquote>
  </body>
</html>