I have one QTabWidget and class inherits of QTreeView:
Qt Code:
  1. class TreeView : public QTreeView
  2. {
  3. Q_OBJECT
  4.  
  5. QVector<EventsRecord> m_pRecord;
  6.  
  7. public:
  8. TreeView( QWidget *parent = 0 );
  9. virtual ~TreeView();
  10. void clearRecords() { m_pRecord.resize(0); };
  11. void push_backRec( EventsRecord &er ) { m_pRecord.push_back( er ); };
  12. QVector<EventsRecord> getRecords() { return m_pRecord; };
  13. };
To copy to clipboard, switch view to plain text mode 

In vector m_pRecord puts info about files. On main window I add tab on QTabWidget:
Qt Code:
  1. void MainWindow::addTab()
  2. {
  3. m_pTreeView = new TreeView( m_pTab );
  4. m_pTreeView->setObjectName( QString("m_pProp%1").arg( m_pTab->count() ) );
  5. m_pTreeView->clearRecords();
  6. int TAB = m_pTab->addTab( m_pTreeView, tr(" ") );
  7. m_pTab->setTabToolTip( m_pTab->count() - 1, QString("%1").arg( m_pTab->count() - 1 ) );
  8. }
To copy to clipboard, switch view to plain text mode 
m_pTab - pointer to QTabWidget. After this I set model:
Qt Code:
  1. TreeView *m_pProps = fr->findChild<TreeView *>( QString("m_pProp%1")
  2. .arg( m_pTab->tabToolTip( m_pTab->currentIndex() ).toInt() ) );
  3.  
  4. SmallListModel *pSmallModel = new SmallListModel( m_pProps->getRecords(), m_pProps );
  5. m_pProps->setModel( pSmallModel );
To copy to clipboard, switch view to plain text mode 
Why didn't work? I want add many tabs conteints TreeView with one model and different content.
constructor SmallListModel:
Qt Code:
  1. SmallListModel::SmallListModel( QVector<EventsRecord> &records, QObject *parent ):
  2. QAbstractListModel( parent ),
  3. m_pRecords( &records )
  4. {
  5. }
To copy to clipboard, switch view to plain text mode