qtvTable=new QTableView(this);qtvTable->setSelectionBehavior(QAbstractItemView::SelectRows);qtvTable->setEditTriggers(QAbstractItemView::NoEditTriggers);qtvTable->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);qsimModel=new QStandardItemModel(this);qsimModel->setColumnCount(5);QStringList Headers;Headers << tr("Famil") << tr("Name") << tr("Otch") << tr("Schet") << tr("Money");qsimModel->setHorizontalHeaderLabels(Headers);qtvTable->setModel(qsimModel);qsimModel->setRowCount(1000);for (int i=0; i<1000; i++){QStandardItem *item;item=new QStandardItem("dsfgdgsdfgsdfgsdfg");qsimModel->setItem(i,0,item);item=new QStandardItem("dsfgdgsdfgsdfgsdfg");qsimModel->setItem(i,1,item);item=new QStandardItem("dsfgdgsdfgsdfgsdfg");qsimModel->setItem(i,2,item);item=new QStandardItem("dsfgdgsdfgsdfgsdfg");qsimModel->setItem(i,3,item);item=new QStandardItem("dsfgdgsdfgsdfgsdfg");item->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);qsimModel->setItem(i,4,item);}
qtvTable->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);