mstegehu
21st June 2010, 10:58
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 ());
}
How can I get the selected item always visible in the visible area?
regards,
Marcel
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 ());
}
How can I get the selected item always visible in the visible area?
regards,
Marcel