title: How to Use Models with QML?
body: <p>I have a GUI written in qml and c++. 
  There are 2 comboboxes (qt control 5.1). Second combobox has to update at runtime whenever the value of the first one is changed. </p>
  
  <pre><code>maincontext-&gt;setContextProperty("typemodel", QVariant::fromValue(m_typemodel));
  
  maincontext-&gt;setContextProperty("unitmodel", QVariant::fromValue(m_unitmodel));
  </code></pre>
  
  <p>These are 2 models that I give to qml from c++. </p>
  
  <pre><code>ComboBox {
      id: typebox
  
      anchors.left: text1.right
      anchors.leftMargin: 5
      signal changed(string newtext)
  
      width: 70
      height: 23
      anchors.top: parent.top
      anchors.topMargin: 37
      model: typemodel
  
      onCurrentTextChanged: {
  
          mainwin.unitGenerator(typebox.currentText);
  
      }
  </code></pre>
  
  <p>This is the first combobox. As you see, the c++ model of second combobox is updated every time the value of the first is changed (mainwin.unitGenerator(typebox.currentText)). But it does not seem to update the combobox's model. </p>
  
  <p>How can I update qml's model on runtime?</p>