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.
void DxSpots::loadClusters()
{
qDebug() << "Loading clusters";
ui->cbClusters->clear();
qDebug() << "combo count 1 = " << ui->cbClusters->count();
// Load the stored urls into the combo box
queryu.exec("Select url from nodes order by url");
int i = 0;
while (queryu.next())
{
qDebug() << "url is " << queryu.value(0).toString();
ui->cbClusters->insertItem(i, queryu.value(0).toString());
i++;
}
qDebug() << "combo count 2 = " << ui->cbClusters->count();
void DxSpots::loadClusters()
{
qDebug() << "Loading clusters";
ui->cbClusters->clear();
qDebug() << "combo count 1 = " << ui->cbClusters->count();
// Load the stored urls into the combo box
QSqlQuery queryu(::spotsDB);
queryu.exec("Select url from nodes order by url");
int i = 0;
while (queryu.next())
{
qDebug() << "url is " << queryu.value(0).toString();
ui->cbClusters->insertItem(i, queryu.value(0).toString());
i++;
}
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.
Bookmarks