I never tried, but perhaps you can use a call to scrollTo :
// Get model index based on markerId
QModelIndexList indexList (m_markerProjectionModel->match (m_markerProjectionModel->index (0,0), Qt::DisplayRole, markerId, 1, Qt::MatchExactly));
if (1 == indexList.count ())
{
m_markersProjectionTableView->selectRow (indexList [0].row ());
m_markersProjectionTableView->scrollTo( indexList[0]); // <= ADD THIS LINE
}
// Get model index based on markerId
QModelIndexList indexList (m_markerProjectionModel->match (m_markerProjectionModel->index (0,0), Qt::DisplayRole, markerId, 1, Qt::MatchExactly));
if (1 == indexList.count ())
{
m_markersProjectionTableView->selectRow (indexList [0].row ());
m_markersProjectionTableView->scrollTo( indexList[0]); // <= ADD THIS LINE
}
To copy to clipboard, switch view to plain text mode
See HERE
Bookmarks