Hello,
If, due to logic, I select a row in my table the selected row is not automaticaly scrolled to the visible area of the TableView.
// 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 ());
}
// 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 ());
}
To copy to clipboard, switch view to plain text mode
How can I get the selected item always visible in the visible area?
regards,
Marcel
Bookmarks