<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font size="-1"><font face="Verdana">Hi Matteo,<br>
        <br>
        <br>
      </font></font><br>
    <div class="moz-cite-prefix">On 05/11/2016 02:41 PM, matteo wrote:<br>
    </div>
    <blockquote cite="mid:57332878.3070709@gmail.com" type="cite">HI
      devs,
      <br>
      <br>
      sorry to write again.. but I'm fighting (again) with Qt and QGIS
      widgets..
      <br>
      <br>
      In the UI I have a simple spinbox and I'd like to add the chance
      for the user to use the data defined properties to update the
      value in the spinbox.
      <br>
      <br>
      Unfortunately I'm not able to update the QgsMapLayerComboBox
      widget to the QgsDataDefinedButton one.
      <br>
      <br>
      With a QgsFieldComboBox I found the easy way signal - solot:
      <br>
      <br>
      layerChanged(QgsMapLayer*) -> setLayer(QgsMapLayer*)
      <br>
      <br>
      that updates the QgsFieldComboBox (same thing with
      QgsFieldExpressionComboBox).
      <br>
      <br>
      But I did not find something similar in the QgsDataDefinedButton
      API.
      <br>
    </blockquote>
    <br>
    look at QgsDataDefinedButton::init<br>
    <br>
    That should set up the button for a layer.<br>
    It is not a slot though, not sure if you can connect this directly,
    you might need to create an intermediate method.<br>
    <br>
    <br>
    Best wishes,<br>
    Denis<br>
    <br>
    <br>
  </body>
</html>