Hi all
I am activating combobox at run time in following slot
Qt Code:
  1. list_combobox.clear();
  2. for(int i=0; i<obj_schedule_table->rowCount(); i++)
  3. {
  4. QWidget *widget1;
  5. widget1 = obj_schedule_table->cellWidget(i,3);
  6. QComboBox *combo = (QComboBox*)widget1->children().at(1);
  7. combo->setEditable(false);
  8. list_combobox<<combo;
  9. }
  10. signalMapper_selection = new QSignalMapper(this);
  11. for(int i=0; i<list_combobox.size(); i++)
  12. {
  13. signalMapper_selection->setMapping(list_combobox.at(i), i);
  14. connect(list_combobox.at(i), SIGNAL(activated(QString)), signalMapper_selection, SLOT (map()));
  15. connect(signalMapper_selection, SIGNAL(mapped(int)), this, SLOT(set_item_combobox_type(int)));
  16. }
To copy to clipboard, switch view to plain text mode 

this slot is called on clicking a button "edit"

in remove_row slot i again connect these combobox to appropriate slots

Qt Code:
  1. signalMapper_selection = new QSignalMapper(this);
  2. QLineEdit *line_edit = (QLineEdit *)obj_schedule_table->cellWidget(index,0);
  3. disconnect(list_combobox.at(index),0,0,0);
  4. obj_schedule_table->removeRow(index);
  5. list_combobox.removeAt(index);
  6. for(int i=0; i<obj_schedule_table->rowCount(); i++)
  7. {
  8. signalMapper_selection->setMapping(list_combobox.at(i), i);
  9. connect(list_combobox.at(i), SIGNAL(activated(QString)), signalMapper_selection, SLOT (map()));
  10. connect(signalMapper_selection, SIGNAL(mapped(int)), this, SLOT(set_item_combobox_type(int)));
  11. }
To copy to clipboard, switch view to plain text mode 

When i remove a row and than activate a combobox in row below than that row it give segmantaion fault while working fine above the removed row.

Please help me what i am doing wrong.