I'm populating the combo box from a query and the debug shows the correct number of box entries after an add or a delete.
Qt Code:
  1. void DxSpots::loadClusters()
  2. {
  3. qDebug() << "Loading clusters";
  4. ui->cbClusters->clear();
  5. qDebug() << "combo count 1 = " << ui->cbClusters->count();
  6. // Load the stored urls into the combo box
  7. QSqlQuery queryu(::spotsDB);
  8. queryu.exec("Select url from nodes order by url");
  9. int i = 0;
  10. while (queryu.next())
  11. {
  12. qDebug() << "url is " << queryu.value(0).toString();
  13.  
  14. ui->cbClusters->insertItem(i, queryu.value(0).toString());
  15. i++;
  16. }
  17. qDebug() << "combo count 2 = " << ui->cbClusters->count();
To copy to clipboard, switch view to plain text mode 
This slot is called each time an add or delete is done from the options form.