I have the following combo box code in my constructor
{
ui->setupUi(this);
ippartNumber = "";
ui->bushingStructuralcomboBox->clear();
ui->bushingStructuralcomboBox->addItem("Bushing");
ui->bushingStructuralcomboBox->addItem("Structural");
}
I map the data on the filed using the datamapper as follows
mapper->addMapping(ui->bushingStructuralcomboBox,model->fieldIndex("Bushing_Structural"));
The value in the db is either a B or S. When I change the combobox it stores the correct value in the db. My problem is when I pull the record back up, the value in the combo box is always BUSHING. How do I get the combox to recognize the db value and change to STRUCTURAL if the db vlue is S. Please provide example code. I've looked at the docs and examples and can't make sense of it.
Bookmarks