Hi, How did you solved that? I'm facing the similar problem, getting segmentation fault (using windows Qt-4.7.4) while trying to insert or add same object in different tabs.
code:
static int tabIndex;
PageInsideTab *ptr; // PageInsideTab is inherited from QWidget
ptr = pageList.at(tabIndex); // QList <PageInsideTab *> pageList - I declared 15 pointers and stored into this list
ptr = new PageInsideTab(tabWidget);
qDebug()<<"tabIndex="<<tabIndex;
tabWidget->insertTab(tabIndex, ptr, name); // name is QString
// tabWidget->addTab(ptr, name);
tabIndex++;
when this slot is running first time one tab is inserted, all ok, but in the second run I'm getting seg. fault.
Any solution please?





Reply With Quote
Bookmarks