I used Designer to place the combobox. I checked the ui_h file and the combobox pointer is listed with the proper name cmbName. I have tried clean and rebuild. The combo box does get populated with this code:
void SectionTimer::updateNameComboBox()
{
query.exec("SELECT id,LName, FName FROM master");
ui->cmbName->blockSignals(true);
ui->cmbName->clear();
while (query.next())
{
ui->cmbName->addItem(query.value (2).toString()+ " "
+ query.value (1).toString(),query.value (0).toInt());
ui->cmbName->blockSignals(false);
}
}
void SectionTimer::updateNameComboBox()
{
QSqlQuery query;
query.exec("SELECT id,LName, FName FROM master");
ui->cmbName->blockSignals(true);
ui->cmbName->clear();
while (query.next())
{
ui->cmbName->addItem(query.value (2).toString()+ " "
+ query.value (1).toString(),query.value (0).toInt());
ui->cmbName->blockSignals(false);
}
}
To copy to clipboard, switch view to plain text mode
And if I comment out the code listed that causes the segmentation fault, the program runs and the combobox is populated. I did run the debugger and posted the picture of the output. I tried to figure out how to get the back trace...is that what is shown in the lower left window?
What else do I need to look at?
Bookmarks