Hi all
I am facing a error segmentation fault in the following code
for(int i=0; i<obj_schedule_table->rowCount(); i++)
{
widget1 = obj_schedule_table->cellWidget(i,3);
QComboBox *combo
= dynamic_cast<QComboBox
*>
(widget1
->children
().
at(1));
combo->setEditable(false);
mapper->setMapping(combo, i);
connect(combo,
SIGNAL(activated
(QString)), mapper,
SLOT (map
()));
}
connect(mapper, SIGNAL(mapped(int)), this, SLOT(set_item_combobox_type(int)));
mapper = new QSignalMapper ();
for(int i=0; i<obj_schedule_table->rowCount(); i++)
{
QWidget *widget1;
widget1 = obj_schedule_table->cellWidget(i,3);
QComboBox *combo = dynamic_cast<QComboBox*>(widget1->children().at(1));
combo->setEditable(false);
mapper->setMapping(combo, i);
connect(combo, SIGNAL(activated(QString)), mapper, SLOT (map()));
}
connect(mapper, SIGNAL(mapped(int)), this, SLOT(set_item_combobox_type(int)));
To copy to clipboard, switch view to plain text mode
I know it may be due to my code is pointing some null pointer but i am not understanding what is the cause of error.
Thanks in advance.
Bookmarks