Search code examples
c++qtqtableviewqscrollarea

QTableView how to get the scroll bar row position


void scrollBarValueChanged(int value)
{
     int row = view->rowAt(value);
}

Such as the title, when the scroll bar rolling, how to get the scroll row index?


Solution

  • Looks like rowAt and columnAt are exactly what you need.