title: How to dynamically add Item to QComboBox with QSqlQueryModel
body: <p>I am new to QT and learning how to populate QComboBox. I know about addItem() method of QComboBox to add new item. But in my case it is not working. Below is relevant part my code.</p>
  
  <pre><code>    QSqlQuery q;
  
      q.prepare("SELECT fname from Person");
  
      if(q.exec())
      {
          QSqlQueryModel *model = new QSqlQueryModel(this);
  
          model-&gt;setQuery(q);
  
          ui-&gt;comboFName-&gt;setModel(model);
  
          db.close();
      }
  
      QString item = "XYZ";
  
      ui-&gt;comboFName-&gt;addItem(item);
  </code></pre>
  
  <p>My QComboBox is getting populated with data from QSqlQueryModel but manual insertion of    addItem() is not working.</p>