Hi,
As It's confidential, I'm only giving the relevant code.

I created a form PageInsideTab.ui which is inherited from QWidget and I put a button and a textEdit on it.
Now the header file:
#ifndef CHATWINDOW_H
#define CHATWINDOW_H

#include <QtGui>
#include <QWidget>
#include <QTabWidget>
#include "PageInsideTab.h"

namespace Ui {
class ChatWindow;
}

class ChatWindow : public QWidget
{
Q_OBJECT

public:
explicit ChatWindow(QWidget *parent = 0);
~ChatWindow();
void closeEvent();
QVBoxLayout *mainLayout;
QTabWidget *tabWidget;
QLabel *lbl_Message;
QLineEdit *lineEdit_TextInput;
QList <PageInsideTab *> pageList;


private:
Ui::ChatWindow *ui;

public slots:
void init();
void returnPressed();
void appendMessage(const QString &from, const QString &message);
void setBuddyName(QString);
void createNewTab(QString buddyName);
void historyButtonClicked();
void createPageList();
};

#endif // CHATWINDOW_H


and part of the cpp file:


void ChatWindow :: init()
{
mainLayout = new QVBoxLayout();
setLayout(mainLayout);
tabWidget = new QTabWidget();
tabWidget->setMinimumSize(200,150);
lbl_Message = new QLabel();
lbl_Message->setText("Message:");
lineEdit_TextInput = new QLineEdit();
mainLayout->addWidget(tabWidget);
mainLayout->addWidget(lbl_Message);
mainLayout->addWidget(lineEdit_TextInput);
tabWidget->show();
lbl_Message->show();
lineEdit_TextInput->show();
}

void ChatWindow :: createPageList()
{
PageInsideTab *p1, *p2, *p3, *p4, *p5, *p6, *p7, *p8, *p9, *p10, *p11, *p12, *p13, *p14, *p15;
pageList.append(p1);
pageList.append(p2);
pageList.append(p3);
pageList.append(p4);
pageList.append(p5);
pageList.append(p6);
pageList.append(p7);
pageList.append(p8);
pageList.append(p9);
pageList.append(p10);
pageList.append(p11);
pageList.append(p12);
pageList.append(p13);
pageList.append(p14);
pageList.append(p15);
}

void ChatWindow :: createNewTab(QString buddyName)
{
static int tabIndex;
PageInsideTab *ptr;
// ptr = pageList.at(tabIndex);
ptr = new PageInsideTab(tabWidget);
//qDebug()<<"tabIndex="<<tabIndex;
tabWidget->insertTab(tabIndex, ptr, buddyName);
// tabWidget->addTab(ptr, buddyName);
tabIndex++;
}


init() and createPageList() i'm calling in the constructor of this class(ChatWindow), and creatNewTab(QString) is
called from another class supplying the parameter buddyName. This time I've commented the use of pageList pointers
but in this case also, I'm getting SEGMENTATION fault in the SECOND run of the slot creatNewTab(QString).