title: How to use a QML Combobox to lookup data from a c++ model and insert it into another one
body: <p>after creating some database applications using Qt and widgets, I am exploring Quick Controls and QML. I want to mimic the use of a QComboBox mapped to a QSqlRelationalTableModel to populate one table out of another one. Something similar to:</p>
  <pre><code>ui-&gt;cmbArea-&gt;setModel(model-&gt;relationModel(areaIdx));
  ui-&gt;cmbArea-&gt;setModelColumn(model-&gt;relationModel(areaIdx)-&gt;fieldIndex(&quot;description&quot;));
  mapper-&gt;addMapping(ui-&gt;cmbArea, areaIdx);
  </code></pre>
  <p>(Using widgets, cmbArea is a QComboBox, model is a QSqlRelationalTableModel, and mapper a QDataWidgetMapper)</p>
  <p>I managed to get something working like:</p>
  <pre><code>property ModeloCodificador modeloCodificador: ModeloCodificador{}
  property ModeloTabla modeloTabla: ModeloTabla{}
  
  ComboBox {
      model: modeloCodificador
      textRole: &quot;elemento&quot;
      valueRole: &quot;id&quot;
      Component.onCompleted: {
            currentIndex = find(modeloTabla.get(0, modeloTabla.codigoIdx), Qt.MatchExactly)
      }
      onActivated: {
            modeloTabla.set(0, modeloTabla.codigoIdx, currentValue)
      }
  }
  </code></pre>
  <p>Is there a better way to accomplish this?</p>