dbzhang800:QItemSelectionModel * QAbstractItemView::selectionModel() const
通过selectionModel操作
(2014-07-28 00:24)
QItemSelectionModel *selectionModel = CConstParam::s_Ui.m_pTableView_1->selectionModel();
QModelIndex topLeft;
QModelIndex bottomRight;
topLeft = CConstParam::s_pModel_1->index(0, 0, QModelIndex());
bottomRight = CConstParam::s_pModel_1->index(5, 2, QModelIndex());
QItemSelection selection(topLeft, bottomRight);
selectionModel->select(selection, QItemSelectionModel::Select);
这样不行,请问具体该怎么实现?